using System;
using System.Collections;
using System.ComponentModel;
using System.Data;
using System.Windows.Forms;
using C1.Win.C1Input;
using C1.Win.C1List;
using C1.Win.C1TrueDBGrid;
using PCSComProcurement.Purchase.BO;
using PCSComProcurement.Purchase.DS;
using PCSComUtils.Common;
using PCSComUtils.Common.BO;
using PCSComUtils.Framework.ReportFrame.BO;
using PCSComUtils.PCSExc;
using PCSUtils.Framework.ReportFrame;
using PCSUtils.Log;
using PCSUtils.Utils;
using AddNewModeEnum = C1.Win.C1TrueDBGrid.AddNewModeEnum;
using BeforeColUpdateEventArgs = C1.Win.C1TrueDBGrid.BeforeColUpdateEventArgs;
using C1DisplayColumn = C1.Win.C1TrueDBGrid.C1DisplayColumn;
using CancelEventArgs = System.ComponentModel.CancelEventArgs;
using ColEventArgs = C1.Win.C1TrueDBGrid.ColEventArgs;

namespace PCSProcurement.Purchase
{
	/// <summary>
	/// Summary description for POReturnToVendor.
	/// </summary>
	public class POReturnToVendor : Form
	{
		private Label lblPostDate;
		private C1DateEdit dtmPostDate;
		private C1Combo cboCCN;
		private Label lblCCN;
		private Button btnClose;
		private Button btnHelp;
		private Button btnDelete;
		private Button btnSave;
		private Button btnAdd;
		private Button btnPrint;
		private Label lblReturnNo;
		private Label lblMasLoc;
		private Label lblRefNo;
		private Label lblProductionLine;
		private Label lblReturnBy;
		private ComboBox cboReturnBy;
		private TextBox txtReturnNo;
		private TextBox txtMasLoc;
		private TextBox txtRefNo;
		private TextBox txtProductionLine;
		private Button btnReturnNo;
		private Button btnMasLoc;
		private Button btnRefNo;
		private Button btnProductionLine;
		private Label lblVendor;
		private Label lblVendorLocation;
		private TextBox txtVendorCode;
		private TextBox txtVendorName;
		private TextBox txtVendorLoc;
		private Button btnVendorCode;
		private Button btnVendorLoc;
		private C1TrueDBGrid dgrdData;
		private Label lblInvoice;
		private Label lblPurchaseOrder;
		/// <summary>
		/// Required designer variable.
		/// </summary>
		private Container components = null;
		const string THIS = "PCSProcurement.Purchase.POReturnToVendor";
		const string V_PORETURNTOVENDOR ="V_POReturnToVendor";
		const string V_INVOICETORETURN ="V_InvoiceToReturn";
		const string PURCHASELOCCODE_FLD = "PurchaseLocCode";
		const string PARTYCODE_FLD = "PartyCode";
		const string PARTYNAME_FLD = "PartyName";
		const string MASTERLOCCODE_FLD ="MasterLocCode";
		const string PURCHASEORDERCODE_FLD ="PurchaseOrderCode";
		const string PRODUCTIONLINECODE_FLD = "ProductionLine";
		const string TOTAL_REMAIN_FLD ="TotalRemain";

		private DataTable dtbGridLayOut;
		private DataSet dstData;
		private EnumAction enumAction = EnumAction.Default;
		private POReturnToVendorBO boReturn = new POReturnToVendorBO();
		private PO_ReturnToVendorMasterVO voReturnMaster;
		DataTable dtbReceived = new DataTable();
		private DateTime dtmOrderDate;

		public POReturnToVendor()
		{
			//
			// Required for Windows Form Designer support
			//
			InitializeComponent();

			//
			// TODO: Add any constructor code after InitializeComponent call
			//
		}

		/// <summary>
		/// Clean up any resources being used.
		/// </summary>
		protected override void Dispose( bool disposing )
		{
			if( disposing )
			{
				if(components != null)
				{
					components.Dispose();
				}
			}
			base.Dispose( disposing );
		}

		#region Windows Form Designer generated code
		/// <summary>
		/// Required method for Designer support - do not modify
		/// the contents of this method with the code editor.
		/// </summary>
		private void InitializeComponent()
		{
			System.Resources.ResourceManager resources = new System.Resources.ResourceManager(typeof(POReturnToVendor));
			this.lblPostDate = new System.Windows.Forms.Label();
			this.dtmPostDate = new C1.Win.C1Input.C1DateEdit();
			this.lblReturnNo = new System.Windows.Forms.Label();
			this.lblMasLoc = new System.Windows.Forms.Label();
			this.lblRefNo = new System.Windows.Forms.Label();
			this.lblVendor = new System.Windows.Forms.Label();
			this.lblProductionLine = new System.Windows.Forms.Label();
			this.lblVendorLocation = new System.Windows.Forms.Label();
			this.lblReturnBy = new System.Windows.Forms.Label();
			this.cboReturnBy = new System.Windows.Forms.ComboBox();
			this.txtReturnNo = new System.Windows.Forms.TextBox();
			this.txtMasLoc = new System.Windows.Forms.TextBox();
			this.txtRefNo = new System.Windows.Forms.TextBox();
			this.txtProductionLine = new System.Windows.Forms.TextBox();
			this.txtVendorCode = new System.Windows.Forms.TextBox();
			this.txtVendorName = new System.Windows.Forms.TextBox();
			this.txtVendorLoc = new System.Windows.Forms.TextBox();
			this.btnReturnNo = new System.Windows.Forms.Button();
			this.btnMasLoc = new System.Windows.Forms.Button();
			this.btnRefNo = new System.Windows.Forms.Button();
			this.btnProductionLine = new System.Windows.Forms.Button();
			this.btnVendorCode = new System.Windows.Forms.Button();
			this.btnVendorLoc = new System.Windows.Forms.Button();
			this.cboCCN = new C1.Win.C1List.C1Combo();
			this.lblCCN = new System.Windows.Forms.Label();
			this.btnClose = new System.Windows.Forms.Button();
			this.btnHelp = new System.Windows.Forms.Button();
			this.btnDelete = new System.Windows.Forms.Button();
			this.btnSave = new System.Windows.Forms.Button();
			this.btnAdd = new System.Windows.Forms.Button();
			this.btnPrint = new System.Windows.Forms.Button();
			this.dgrdData = new C1.Win.C1TrueDBGrid.C1TrueDBGrid();
			this.lblInvoice = new System.Windows.Forms.Label();
			this.lblPurchaseOrder = new System.Windows.Forms.Label();
			((System.ComponentModel.ISupportInitialize)(this.dtmPostDate)).BeginInit();
			((System.ComponentModel.ISupportInitialize)(this.cboCCN)).BeginInit();
			((System.ComponentModel.ISupportInitialize)(this.dgrdData)).BeginInit();
			this.SuspendLayout();
			// 
			// lblPostDate
			// 
			this.lblPostDate.AccessibleDescription = resources.GetString("lblPostDate.AccessibleDescription");
			this.lblPostDate.AccessibleName = resources.GetString("lblPostDate.AccessibleName");
			this.lblPostDate.Anchor = ((System.Windows.Forms.AnchorStyles)(resources.GetObject("lblPostDate.Anchor")));
			this.lblPostDate.AutoSize = ((bool)(resources.GetObject("lblPostDate.AutoSize")));
			this.lblPostDate.Dock = ((System.Windows.Forms.DockStyle)(resources.GetObject("lblPostDate.Dock")));
			this.lblPostDate.Enabled = ((bool)(resources.GetObject("lblPostDate.Enabled")));
			this.lblPostDate.Font = ((System.Drawing.Font)(resources.GetObject("lblPostDate.Font")));
			this.lblPostDate.ForeColor = System.Drawing.Color.Maroon;
			this.lblPostDate.Image = ((System.Drawing.Image)(resources.GetObject("lblPostDate.Image")));
			this.lblPostDate.ImageAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("lblPostDate.ImageAlign")));
			this.lblPostDate.ImageIndex = ((int)(resources.GetObject("lblPostDate.ImageIndex")));
			this.lblPostDate.ImeMode = ((System.Windows.Forms.ImeMode)(resources.GetObject("lblPostDate.ImeMode")));
			this.lblPostDate.Location = ((System.Drawing.Point)(resources.GetObject("lblPostDate.Location")));
			this.lblPostDate.Name = "lblPostDate";
			this.lblPostDate.RightToLeft = ((System.Windows.Forms.RightToLeft)(resources.GetObject("lblPostDate.RightToLeft")));
			this.lblPostDate.Size = ((System.Drawing.Size)(resources.GetObject("lblPostDate.Size")));
			this.lblPostDate.TabIndex = ((int)(resources.GetObject("lblPostDate.TabIndex")));
			this.lblPostDate.Text = resources.GetString("lblPostDate.Text");
			this.lblPostDate.TextAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("lblPostDate.TextAlign")));
			this.lblPostDate.Visible = ((bool)(resources.GetObject("lblPostDate.Visible")));
			// 
			// dtmPostDate
			// 
			this.dtmPostDate.AcceptsEscape = ((bool)(resources.GetObject("dtmPostDate.AcceptsEscape")));
			this.dtmPostDate.AccessibleDescription = resources.GetString("dtmPostDate.AccessibleDescription");
			this.dtmPostDate.AccessibleName = resources.GetString("dtmPostDate.AccessibleName");
			this.dtmPostDate.ValueIsDbNull = false;
			this.dtmPostDate.Anchor = ((System.Windows.Forms.AnchorStyles)(resources.GetObject("dtmPostDate.Anchor")));
			this.dtmPostDate.AutoSize = ((bool)(resources.GetObject("dtmPostDate.AutoSize")));
			this.dtmPostDate.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("dtmPostDate.BackgroundImage")));
			this.dtmPostDate.BorderStyle = ((System.Windows.Forms.BorderStyle)(resources.GetObject("dtmPostDate.BorderStyle")));
			// 
			// dtmPostDate.Calendar
			// 
			this.dtmPostDate.Calendar.AccessibleDescription = resources.GetString("dtmPostDate.Calendar.AccessibleDescription");
			this.dtmPostDate.Calendar.AccessibleName = resources.GetString("dtmPostDate.Calendar.AccessibleName");
			this.dtmPostDate.Calendar.AnnuallyBoldedDates = ((System.DateTime[])(resources.GetObject("dtmPostDate.Calendar.AnnuallyBoldedDates")));
			this.dtmPostDate.Calendar.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("dtmPostDate.Calendar.BackgroundImage")));
			this.dtmPostDate.Calendar.BoldedDates = ((System.DateTime[])(resources.GetObject("dtmPostDate.Calendar.BoldedDates")));
			this.dtmPostDate.Calendar.CalendarDimensions = ((System.Drawing.Size)(resources.GetObject("dtmPostDate.Calendar.CalendarDimensions")));
			this.dtmPostDate.Calendar.Enabled = ((bool)(resources.GetObject("dtmPostDate.Calendar.Enabled")));
			this.dtmPostDate.Calendar.FirstDayOfWeek = ((System.Windows.Forms.Day)(resources.GetObject("dtmPostDate.Calendar.FirstDayOfWeek")));
			this.dtmPostDate.Calendar.Font = ((System.Drawing.Font)(resources.GetObject("dtmPostDate.Calendar.Font")));
			this.dtmPostDate.Calendar.ImeMode = ((System.Windows.Forms.ImeMode)(resources.GetObject("dtmPostDate.Calendar.ImeMode")));
			this.dtmPostDate.Calendar.MonthlyBoldedDates = ((System.DateTime[])(resources.GetObject("dtmPostDate.Calendar.MonthlyBoldedDates")));
			this.dtmPostDate.Calendar.RightToLeft = ((System.Windows.Forms.RightToLeft)(resources.GetObject("dtmPostDate.Calendar.RightToLeft")));
			this.dtmPostDate.Calendar.ShowClearButton = ((bool)(resources.GetObject("dtmPostDate.Calendar.ShowClearButton")));
			this.dtmPostDate.Calendar.ShowTodayButton = ((bool)(resources.GetObject("dtmPostDate.Calendar.ShowTodayButton")));
			this.dtmPostDate.Calendar.ShowWeekNumbers = ((bool)(resources.GetObject("dtmPostDate.Calendar.ShowWeekNumbers")));
			this.dtmPostDate.CaseSensitive = ((bool)(resources.GetObject("dtmPostDate.CaseSensitive")));
			this.dtmPostDate.Culture = ((int)(resources.GetObject("dtmPostDate.Culture")));
			this.dtmPostDate.CurrentTimeZone = ((bool)(resources.GetObject("dtmPostDate.CurrentTimeZone")));
			this.dtmPostDate.CustomFormat = resources.GetString("dtmPostDate.CustomFormat");
			this.dtmPostDate.DaylightTimeAdjustment = ((C1.Win.C1Input.DaylightTimeAdjustmentEnum)(resources.GetObject("dtmPostDate.DaylightTimeAdjustment")));
			this.dtmPostDate.DisplayFormat.CustomFormat = resources.GetString("dtmPostDate.DisplayFormat.CustomFormat");
			this.dtmPostDate.DisplayFormat.FormatType = ((C1.Win.C1Input.FormatTypeEnum)(resources.GetObject("dtmPostDate.DisplayFormat.FormatType")));
			this.dtmPostDate.DisplayFormat.Inherit = ((C1.Win.C1Input.FormatInfoInheritFlags)(resources.GetObject("dtmPostDate.DisplayFormat.Inherit")));
			this.dtmPostDate.DisplayFormat.NullText = resources.GetString("dtmPostDate.DisplayFormat.NullText");
			this.dtmPostDate.DisplayFormat.TrimEnd = ((bool)(resources.GetObject("dtmPostDate.DisplayFormat.TrimEnd")));
			this.dtmPostDate.DisplayFormat.TrimStart = ((bool)(resources.GetObject("dtmPostDate.DisplayFormat.TrimStart")));
			this.dtmPostDate.Dock = ((System.Windows.Forms.DockStyle)(resources.GetObject("dtmPostDate.Dock")));
			this.dtmPostDate.DropDownFormAlign = ((C1.Win.C1Input.DropDownFormAlignmentEnum)(resources.GetObject("dtmPostDate.DropDownFormAlign")));
			this.dtmPostDate.EditFormat.CustomFormat = resources.GetString("dtmPostDate.EditFormat.CustomFormat");
			this.dtmPostDate.EditFormat.FormatType = ((C1.Win.C1Input.FormatTypeEnum)(resources.GetObject("dtmPostDate.EditFormat.FormatType")));
			this.dtmPostDate.EditFormat.Inherit = ((C1.Win.C1Input.FormatInfoInheritFlags)(resources.GetObject("dtmPostDate.EditFormat.Inherit")));
			this.dtmPostDate.EditFormat.NullText = resources.GetString("dtmPostDate.EditFormat.NullText");
			this.dtmPostDate.EditFormat.TrimEnd = ((bool)(resources.GetObject("dtmPostDate.EditFormat.TrimEnd")));
			this.dtmPostDate.EditFormat.TrimStart = ((bool)(resources.GetObject("dtmPostDate.EditFormat.TrimStart")));
			this.dtmPostDate.EditMask = resources.GetString("dtmPostDate.EditMask");
			this.dtmPostDate.EmptyAsNull = ((bool)(resources.GetObject("dtmPostDate.EmptyAsNull")));
			this.dtmPostDate.Enabled = ((bool)(resources.GetObject("dtmPostDate.Enabled")));
			this.dtmPostDate.ErrorInfo.BeepOnError = ((bool)(resources.GetObject("dtmPostDate.ErrorInfo.BeepOnError")));
			this.dtmPostDate.ErrorInfo.ErrorMessage = resources.GetString("dtmPostDate.ErrorInfo.ErrorMessage");
			this.dtmPostDate.ErrorInfo.ErrorMessageCaption = resources.GetString("dtmPostDate.ErrorInfo.ErrorMessageCaption");
			this.dtmPostDate.ErrorInfo.ShowErrorMessage = ((bool)(resources.GetObject("dtmPostDate.ErrorInfo.ShowErrorMessage")));
			this.dtmPostDate.ErrorInfo.ValueOnError = ((object)(resources.GetObject("dtmPostDate.ErrorInfo.ValueOnError")));
			this.dtmPostDate.Font = ((System.Drawing.Font)(resources.GetObject("dtmPostDate.Font")));
			this.dtmPostDate.FormatType = ((C1.Win.C1Input.FormatTypeEnum)(resources.GetObject("dtmPostDate.FormatType")));
			this.dtmPostDate.GapHeight = ((int)(resources.GetObject("dtmPostDate.GapHeight")));
			this.dtmPostDate.GMTOffset = ((System.TimeSpan)(resources.GetObject("dtmPostDate.GMTOffset")));
			this.dtmPostDate.ImeMode = ((System.Windows.Forms.ImeMode)(resources.GetObject("dtmPostDate.ImeMode")));
			this.dtmPostDate.InitialSelection = ((C1.Win.C1Input.InitialSelectionEnum)(resources.GetObject("dtmPostDate.InitialSelection")));
			this.dtmPostDate.Location = ((System.Drawing.Point)(resources.GetObject("dtmPostDate.Location")));
			this.dtmPostDate.MaskInfo.AutoTabWhenFilled = ((bool)(resources.GetObject("dtmPostDate.MaskInfo.AutoTabWhenFilled")));
			this.dtmPostDate.MaskInfo.CaseSensitive = ((bool)(resources.GetObject("dtmPostDate.MaskInfo.CaseSensitive")));
			this.dtmPostDate.MaskInfo.CopyWithLiterals = ((bool)(resources.GetObject("dtmPostDate.MaskInfo.CopyWithLiterals")));
			this.dtmPostDate.MaskInfo.EditMask = resources.GetString("dtmPostDate.MaskInfo.EditMask");
			this.dtmPostDate.MaskInfo.EmptyAsNull = ((bool)(resources.GetObject("dtmPostDate.MaskInfo.EmptyAsNull")));
			this.dtmPostDate.MaskInfo.ErrorMessage = resources.GetString("dtmPostDate.MaskInfo.ErrorMessage");
			this.dtmPostDate.MaskInfo.Inherit = ((C1.Win.C1Input.MaskInfoInheritFlags)(resources.GetObject("dtmPostDate.MaskInfo.Inherit")));
			this.dtmPostDate.MaskInfo.PromptChar = ((char)(resources.GetObject("dtmPostDate.MaskInfo.PromptChar")));
			this.dtmPostDate.MaskInfo.ShowLiterals = ((C1.Win.C1Input.ShowLiteralsEnum)(resources.GetObject("dtmPostDate.MaskInfo.ShowLiterals")));
			this.dtmPostDate.MaskInfo.StoredEmptyChar = ((char)(resources.GetObject("dtmPostDate.MaskInfo.StoredEmptyChar")));
			this.dtmPostDate.MaxLength = ((int)(resources.GetObject("dtmPostDate.MaxLength")));
			this.dtmPostDate.Name = "dtmPostDate";
			this.dtmPostDate.NullText = resources.GetString("dtmPostDate.NullText");
			this.dtmPostDate.ParseInfo.CaseSensitive = ((bool)(resources.GetObject("dtmPostDate.ParseInfo.CaseSensitive")));
			this.dtmPostDate.ParseInfo.CustomFormat = resources.GetString("dtmPostDate.ParseInfo.CustomFormat");
			this.dtmPostDate.ParseInfo.DateTimeStyle = ((C1.Win.C1Input.DateTimeStyleFlags)(resources.GetObject("dtmPostDate.ParseInfo.DateTimeStyle")));
			this.dtmPostDate.ParseInfo.EmptyAsNull = ((bool)(resources.GetObject("dtmPostDate.ParseInfo.EmptyAsNull")));
			this.dtmPostDate.ParseInfo.ErrorMessage = resources.GetString("dtmPostDate.ParseInfo.ErrorMessage");
			this.dtmPostDate.ParseInfo.FormatType = ((C1.Win.C1Input.FormatTypeEnum)(resources.GetObject("dtmPostDate.ParseInfo.FormatType")));
			this.dtmPostDate.ParseInfo.Inherit = ((C1.Win.C1Input.ParseInfoInheritFlags)(resources.GetObject("dtmPostDate.ParseInfo.Inherit")));
			this.dtmPostDate.ParseInfo.NullText = resources.GetString("dtmPostDate.ParseInfo.NullText");
			this.dtmPostDate.ParseInfo.TrimEnd = ((bool)(resources.GetObject("dtmPostDate.ParseInfo.TrimEnd")));
			this.dtmPostDate.ParseInfo.TrimStart = ((bool)(resources.GetObject("dtmPostDate.ParseInfo.TrimStart")));
			this.dtmPostDate.PasswordChar = ((char)(resources.GetObject("dtmPostDate.PasswordChar")));
			this.dtmPostDate.PostValidation.CaseSensitive = ((bool)(resources.GetObject("dtmPostDate.PostValidation.CaseSensitive")));
			this.dtmPostDate.PostValidation.ErrorMessage = resources.GetString("dtmPostDate.PostValidation.ErrorMessage");
			this.dtmPostDate.PostValidation.Inherit = ((C1.Win.C1Input.PostValidationInheritFlags)(resources.GetObject("dtmPostDate.PostValidation.Inherit")));
			this.dtmPostDate.PostValidation.Validation = ((C1.Win.C1Input.PostValidationTypeEnum)(resources.GetObject("dtmPostDate.PostValidation.Validation")));
			this.dtmPostDate.PostValidation.Values = ((System.Array)(resources.GetObject("dtmPostDate.PostValidation.Values")));
			this.dtmPostDate.PostValidation.ValuesExcluded = ((System.Array)(resources.GetObject("dtmPostDate.PostValidation.ValuesExcluded")));
			this.dtmPostDate.PreValidation.CaseSensitive = ((bool)(resources.GetObject("dtmPostDate.PreValidation.CaseSensitive")));
			this.dtmPostDate.PreValidation.ErrorMessage = resources.GetString("dtmPostDate.PreValidation.ErrorMessage");
			this.dtmPostDate.PreValidation.Inherit = ((C1.Win.C1Input.PreValidationInheritFlags)(resources.GetObject("dtmPostDate.PreValidation.Inherit")));
			this.dtmPostDate.PreValidation.ItemSeparator = resources.GetString("dtmPostDate.PreValidation.ItemSeparator");
			this.dtmPostDate.PreValidation.PatternString = resources.GetString("dtmPostDate.PreValidation.PatternString");
			this.dtmPostDate.PreValidation.RegexOptions = ((C1.Win.C1Input.RegexOptionFlags)(resources.GetObject("dtmPostDate.PreValidation.RegexOptions")));
			this.dtmPostDate.PreValidation.TrimEnd = ((bool)(resources.GetObject("dtmPostDate.PreValidation.TrimEnd")));
			this.dtmPostDate.PreValidation.TrimStart = ((bool)(resources.GetObject("dtmPostDate.PreValidation.TrimStart")));
			this.dtmPostDate.PreValidation.Validation = ((C1.Win.C1Input.PreValidationTypeEnum)(resources.GetObject("dtmPostDate.PreValidation.Validation")));
			this.dtmPostDate.RightToLeft = ((System.Windows.Forms.RightToLeft)(resources.GetObject("dtmPostDate.RightToLeft")));
			this.dtmPostDate.ShowFocusRectangle = ((bool)(resources.GetObject("dtmPostDate.ShowFocusRectangle")));
			this.dtmPostDate.Size = ((System.Drawing.Size)(resources.GetObject("dtmPostDate.Size")));
			this.dtmPostDate.TabIndex = ((int)(resources.GetObject("dtmPostDate.TabIndex")));
			this.dtmPostDate.Tag = ((object)(resources.GetObject("dtmPostDate.Tag")));
			this.dtmPostDate.TextAlign = ((System.Windows.Forms.HorizontalAlignment)(resources.GetObject("dtmPostDate.TextAlign")));
			this.dtmPostDate.TrimEnd = ((bool)(resources.GetObject("dtmPostDate.TrimEnd")));
			this.dtmPostDate.TrimStart = ((bool)(resources.GetObject("dtmPostDate.TrimStart")));
			this.dtmPostDate.UserCultureOverride = ((bool)(resources.GetObject("dtmPostDate.UserCultureOverride")));
			this.dtmPostDate.Value = ((object)(resources.GetObject("dtmPostDate.Value")));
			this.dtmPostDate.VerticalAlign = ((C1.Win.C1Input.VerticalAlignEnum)(resources.GetObject("dtmPostDate.VerticalAlign")));
			this.dtmPostDate.Visible = ((bool)(resources.GetObject("dtmPostDate.Visible")));
			this.dtmPostDate.VisibleButtons = ((C1.Win.C1Input.DropDownControlButtonFlags)(resources.GetObject("dtmPostDate.VisibleButtons")));
			// 
			// lblReturnNo
			// 
			this.lblReturnNo.AccessibleDescription = resources.GetString("lblReturnNo.AccessibleDescription");
			this.lblReturnNo.AccessibleName = resources.GetString("lblReturnNo.AccessibleName");
			this.lblReturnNo.Anchor = ((System.Windows.Forms.AnchorStyles)(resources.GetObject("lblReturnNo.Anchor")));
			this.lblReturnNo.AutoSize = ((bool)(resources.GetObject("lblReturnNo.AutoSize")));
			this.lblReturnNo.Dock = ((System.Windows.Forms.DockStyle)(resources.GetObject("lblReturnNo.Dock")));
			this.lblReturnNo.Enabled = ((bool)(resources.GetObject("lblReturnNo.Enabled")));
			this.lblReturnNo.Font = ((System.Drawing.Font)(resources.GetObject("lblReturnNo.Font")));
			this.lblReturnNo.ForeColor = System.Drawing.Color.Maroon;
			this.lblReturnNo.Image = ((System.Drawing.Image)(resources.GetObject("lblReturnNo.Image")));
			this.lblReturnNo.ImageAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("lblReturnNo.ImageAlign")));
			this.lblReturnNo.ImageIndex = ((int)(resources.GetObject("lblReturnNo.ImageIndex")));
			this.lblReturnNo.ImeMode = ((System.Windows.Forms.ImeMode)(resources.GetObject("lblReturnNo.ImeMode")));
			this.lblReturnNo.Location = ((System.Drawing.Point)(resources.GetObject("lblReturnNo.Location")));
			this.lblReturnNo.Name = "lblReturnNo";
			this.lblReturnNo.RightToLeft = ((System.Windows.Forms.RightToLeft)(resources.GetObject("lblReturnNo.RightToLeft")));
			this.lblReturnNo.Size = ((System.Drawing.Size)(resources.GetObject("lblReturnNo.Size")));
			this.lblReturnNo.TabIndex = ((int)(resources.GetObject("lblReturnNo.TabIndex")));
			this.lblReturnNo.Text = resources.GetString("lblReturnNo.Text");
			this.lblReturnNo.TextAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("lblReturnNo.TextAlign")));
			this.lblReturnNo.Visible = ((bool)(resources.GetObject("lblReturnNo.Visible")));
			// 
			// lblMasLoc
			// 
			this.lblMasLoc.AccessibleDescription = resources.GetString("lblMasLoc.AccessibleDescription");
			this.lblMasLoc.AccessibleName = resources.GetString("lblMasLoc.AccessibleName");
			this.lblMasLoc.Anchor = ((System.Windows.Forms.AnchorStyles)(resources.GetObject("lblMasLoc.Anchor")));
			this.lblMasLoc.AutoSize = ((bool)(resources.GetObject("lblMasLoc.AutoSize")));
			this.lblMasLoc.Dock = ((System.Windows.Forms.DockStyle)(resources.GetObject("lblMasLoc.Dock")));
			this.lblMasLoc.Enabled = ((bool)(resources.GetObject("lblMasLoc.Enabled")));
			this.lblMasLoc.Font = ((System.Drawing.Font)(resources.GetObject("lblMasLoc.Font")));
			this.lblMasLoc.ForeColor = System.Drawing.Color.Maroon;
			this.lblMasLoc.Image = ((System.Drawing.Image)(resources.GetObject("lblMasLoc.Image")));
			this.lblMasLoc.ImageAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("lblMasLoc.ImageAlign")));
			this.lblMasLoc.ImageIndex = ((int)(resources.GetObject("lblMasLoc.ImageIndex")));
			this.lblMasLoc.ImeMode = ((System.Windows.Forms.ImeMode)(resources.GetObject("lblMasLoc.ImeMode")));
			this.lblMasLoc.Location = ((System.Drawing.Point)(resources.GetObject("lblMasLoc.Location")));
			this.lblMasLoc.Name = "lblMasLoc";
			this.lblMasLoc.RightToLeft = ((System.Windows.Forms.RightToLeft)(resources.GetObject("lblMasLoc.RightToLeft")));
			this.lblMasLoc.Size = ((System.Drawing.Size)(resources.GetObject("lblMasLoc.Size")));
			this.lblMasLoc.TabIndex = ((int)(resources.GetObject("lblMasLoc.TabIndex")));
			this.lblMasLoc.Text = resources.GetString("lblMasLoc.Text");
			this.lblMasLoc.TextAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("lblMasLoc.TextAlign")));
			this.lblMasLoc.Visible = ((bool)(resources.GetObject("lblMasLoc.Visible")));
			// 
			// lblRefNo
			// 
			this.lblRefNo.AccessibleDescription = resources.GetString("lblRefNo.AccessibleDescription");
			this.lblRefNo.AccessibleName = resources.GetString("lblRefNo.AccessibleName");
			this.lblRefNo.Anchor = ((System.Windows.Forms.AnchorStyles)(resources.GetObject("lblRefNo.Anchor")));
			this.lblRefNo.AutoSize = ((bool)(resources.GetObject("lblRefNo.AutoSize")));
			this.lblRefNo.Dock = ((System.Windows.Forms.DockStyle)(resources.GetObject("lblRefNo.Dock")));
			this.lblRefNo.Enabled = ((bool)(resources.GetObject("lblRefNo.Enabled")));
			this.lblRefNo.Font = ((System.Drawing.Font)(resources.GetObject("lblRefNo.Font")));
			this.lblRefNo.ForeColor = System.Drawing.Color.Maroon;
			this.lblRefNo.Image = ((System.Drawing.Image)(resources.GetObject("lblRefNo.Image")));
			this.lblRefNo.ImageAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("lblRefNo.ImageAlign")));
			this.lblRefNo.ImageIndex = ((int)(resources.GetObject("lblRefNo.ImageIndex")));
			this.lblRefNo.ImeMode = ((System.Windows.Forms.ImeMode)(resources.GetObject("lblRefNo.ImeMode")));
			this.lblRefNo.Location = ((System.Drawing.Point)(resources.GetObject("lblRefNo.Location")));
			this.lblRefNo.Name = "lblRefNo";
			this.lblRefNo.RightToLeft = ((System.Windows.Forms.RightToLeft)(resources.GetObject("lblRefNo.RightToLeft")));
			this.lblRefNo.Size = ((System.Drawing.Size)(resources.GetObject("lblRefNo.Size")));
			this.lblRefNo.TabIndex = ((int)(resources.GetObject("lblRefNo.TabIndex")));
			this.lblRefNo.Text = resources.GetString("lblRefNo.Text");
			this.lblRefNo.TextAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("lblRefNo.TextAlign")));
			this.lblRefNo.Visible = ((bool)(resources.GetObject("lblRefNo.Visible")));
			// 
			// lblVendor
			// 
			this.lblVendor.AccessibleDescription = resources.GetString("lblVendor.AccessibleDescription");
			this.lblVendor.AccessibleName = resources.GetString("lblVendor.AccessibleName");
			this.lblVendor.Anchor = ((System.Windows.Forms.AnchorStyles)(resources.GetObject("lblVendor.Anchor")));
			this.lblVendor.AutoSize = ((bool)(resources.GetObject("lblVendor.AutoSize")));
			this.lblVendor.Dock = ((System.Windows.Forms.DockStyle)(resources.GetObject("lblVendor.Dock")));
			this.lblVendor.Enabled = ((bool)(resources.GetObject("lblVendor.Enabled")));
			this.lblVendor.Font = ((System.Drawing.Font)(resources.GetObject("lblVendor.Font")));
			this.lblVendor.ForeColor = System.Drawing.Color.Maroon;
			this.lblVendor.Image = ((System.Drawing.Image)(resources.GetObject("lblVendor.Image")));
			this.lblVendor.ImageAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("lblVendor.ImageAlign")));
			this.lblVendor.ImageIndex = ((int)(resources.GetObject("lblVendor.ImageIndex")));
			this.lblVendor.ImeMode = ((System.Windows.Forms.ImeMode)(resources.GetObject("lblVendor.ImeMode")));
			this.lblVendor.Location = ((System.Drawing.Point)(resources.GetObject("lblVendor.Location")));
			this.lblVendor.Name = "lblVendor";
			this.lblVendor.RightToLeft = ((System.Windows.Forms.RightToLeft)(resources.GetObject("lblVendor.RightToLeft")));
			this.lblVendor.Size = ((System.Drawing.Size)(resources.GetObject("lblVendor.Size")));
			this.lblVendor.TabIndex = ((int)(resources.GetObject("lblVendor.TabIndex")));
			this.lblVendor.Text = resources.GetString("lblVendor.Text");
			this.lblVendor.TextAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("lblVendor.TextAlign")));
			this.lblVendor.Visible = ((bool)(resources.GetObject("lblVendor.Visible")));
			// 
			// lblProductionLine
			// 
			this.lblProductionLine.AccessibleDescription = resources.GetString("lblProductionLine.AccessibleDescription");
			this.lblProductionLine.AccessibleName = resources.GetString("lblProductionLine.AccessibleName");
			this.lblProductionLine.Anchor = ((System.Windows.Forms.AnchorStyles)(resources.GetObject("lblProductionLine.Anchor")));
			this.lblProductionLine.AutoSize = ((bool)(resources.GetObject("lblProductionLine.AutoSize")));
			this.lblProductionLine.Dock = ((System.Windows.Forms.DockStyle)(resources.GetObject("lblProductionLine.Dock")));
			this.lblProductionLine.Enabled = ((bool)(resources.GetObject("lblProductionLine.Enabled")));
			this.lblProductionLine.Font = ((System.Drawing.Font)(resources.GetObject("lblProductionLine.Font")));
			this.lblProductionLine.Image = ((System.Drawing.Image)(resources.GetObject("lblProductionLine.Image")));
			this.lblProductionLine.ImageAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("lblProductionLine.ImageAlign")));
			this.lblProductionLine.ImageIndex = ((int)(resources.GetObject("lblProductionLine.ImageIndex")));
			this.lblProductionLine.ImeMode = ((System.Windows.Forms.ImeMode)(resources.GetObject("lblProductionLine.ImeMode")));
			this.lblProductionLine.Location = ((System.Drawing.Point)(resources.GetObject("lblProductionLine.Location")));
			this.lblProductionLine.Name = "lblProductionLine";
			this.lblProductionLine.RightToLeft = ((System.Windows.Forms.RightToLeft)(resources.GetObject("lblProductionLine.RightToLeft")));
			this.lblProductionLine.Size = ((System.Drawing.Size)(resources.GetObject("lblProductionLine.Size")));
			this.lblProductionLine.TabIndex = ((int)(resources.GetObject("lblProductionLine.TabIndex")));
			this.lblProductionLine.Text = resources.GetString("lblProductionLine.Text");
			this.lblProductionLine.TextAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("lblProductionLine.TextAlign")));
			this.lblProductionLine.Visible = ((bool)(resources.GetObject("lblProductionLine.Visible")));
			// 
			// lblVendorLocation
			// 
			this.lblVendorLocation.AccessibleDescription = resources.GetString("lblVendorLocation.AccessibleDescription");
			this.lblVendorLocation.AccessibleName = resources.GetString("lblVendorLocation.AccessibleName");
			this.lblVendorLocation.Anchor = ((System.Windows.Forms.AnchorStyles)(resources.GetObject("lblVendorLocation.Anchor")));
			this.lblVendorLocation.AutoSize = ((bool)(resources.GetObject("lblVendorLocation.AutoSize")));
			this.lblVendorLocation.Dock = ((System.Windows.Forms.DockStyle)(resources.GetObject("lblVendorLocation.Dock")));
			this.lblVendorLocation.Enabled = ((bool)(resources.GetObject("lblVendorLocation.Enabled")));
			this.lblVendorLocation.Font = ((System.Drawing.Font)(resources.GetObject("lblVendorLocation.Font")));
			this.lblVendorLocation.ForeColor = System.Drawing.Color.Black;
			this.lblVendorLocation.Image = ((System.Drawing.Image)(resources.GetObject("lblVendorLocation.Image")));
			this.lblVendorLocation.ImageAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("lblVendorLocation.ImageAlign")));
			this.lblVendorLocation.ImageIndex = ((int)(resources.GetObject("lblVendorLocation.ImageIndex")));
			this.lblVendorLocation.ImeMode = ((System.Windows.Forms.ImeMode)(resources.GetObject("lblVendorLocation.ImeMode")));
			this.lblVendorLocation.Location = ((System.Drawing.Point)(resources.GetObject("lblVendorLocation.Location")));
			this.lblVendorLocation.Name = "lblVendorLocation";
			this.lblVendorLocation.RightToLeft = ((System.Windows.Forms.RightToLeft)(resources.GetObject("lblVendorLocation.RightToLeft")));
			this.lblVendorLocation.Size = ((System.Drawing.Size)(resources.GetObject("lblVendorLocation.Size")));
			this.lblVendorLocation.TabIndex = ((int)(resources.GetObject("lblVendorLocation.TabIndex")));
			this.lblVendorLocation.Text = resources.GetString("lblVendorLocation.Text");
			this.lblVendorLocation.TextAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("lblVendorLocation.TextAlign")));
			this.lblVendorLocation.Visible = ((bool)(resources.GetObject("lblVendorLocation.Visible")));
			// 
			// lblReturnBy
			// 
			this.lblReturnBy.AccessibleDescription = resources.GetString("lblReturnBy.AccessibleDescription");
			this.lblReturnBy.AccessibleName = resources.GetString("lblReturnBy.AccessibleName");
			this.lblReturnBy.Anchor = ((System.Windows.Forms.AnchorStyles)(resources.GetObject("lblReturnBy.Anchor")));
			this.lblReturnBy.AutoSize = ((bool)(resources.GetObject("lblReturnBy.AutoSize")));
			this.lblReturnBy.Dock = ((System.Windows.Forms.DockStyle)(resources.GetObject("lblReturnBy.Dock")));
			this.lblReturnBy.Enabled = ((bool)(resources.GetObject("lblReturnBy.Enabled")));
			this.lblReturnBy.Font = ((System.Drawing.Font)(resources.GetObject("lblReturnBy.Font")));
			this.lblReturnBy.Image = ((System.Drawing.Image)(resources.GetObject("lblReturnBy.Image")));
			this.lblReturnBy.ImageAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("lblReturnBy.ImageAlign")));
			this.lblReturnBy.ImageIndex = ((int)(resources.GetObject("lblReturnBy.ImageIndex")));
			this.lblReturnBy.ImeMode = ((System.Windows.Forms.ImeMode)(resources.GetObject("lblReturnBy.ImeMode")));
			this.lblReturnBy.Location = ((System.Drawing.Point)(resources.GetObject("lblReturnBy.Location")));
			this.lblReturnBy.Name = "lblReturnBy";
			this.lblReturnBy.RightToLeft = ((System.Windows.Forms.RightToLeft)(resources.GetObject("lblReturnBy.RightToLeft")));
			this.lblReturnBy.Size = ((System.Drawing.Size)(resources.GetObject("lblReturnBy.Size")));
			this.lblReturnBy.TabIndex = ((int)(resources.GetObject("lblReturnBy.TabIndex")));
			this.lblReturnBy.Text = resources.GetString("lblReturnBy.Text");
			this.lblReturnBy.TextAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("lblReturnBy.TextAlign")));
			this.lblReturnBy.Visible = ((bool)(resources.GetObject("lblReturnBy.Visible")));
			// 
			// cboReturnBy
			// 
			this.cboReturnBy.AccessibleDescription = resources.GetString("cboReturnBy.AccessibleDescription");
			this.cboReturnBy.AccessibleName = resources.GetString("cboReturnBy.AccessibleName");
			this.cboReturnBy.Anchor = ((System.Windows.Forms.AnchorStyles)(resources.GetObject("cboReturnBy.Anchor")));
			this.cboReturnBy.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("cboReturnBy.BackgroundImage")));
			this.cboReturnBy.Dock = ((System.Windows.Forms.DockStyle)(resources.GetObject("cboReturnBy.Dock")));
			this.cboReturnBy.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
			this.cboReturnBy.Enabled = ((bool)(resources.GetObject("cboReturnBy.Enabled")));
			this.cboReturnBy.Font = ((System.Drawing.Font)(resources.GetObject("cboReturnBy.Font")));
			this.cboReturnBy.ImeMode = ((System.Windows.Forms.ImeMode)(resources.GetObject("cboReturnBy.ImeMode")));
			this.cboReturnBy.IntegralHeight = ((bool)(resources.GetObject("cboReturnBy.IntegralHeight")));
			this.cboReturnBy.ItemHeight = ((int)(resources.GetObject("cboReturnBy.ItemHeight")));
			this.cboReturnBy.Location = ((System.Drawing.Point)(resources.GetObject("cboReturnBy.Location")));
			this.cboReturnBy.MaxDropDownItems = ((int)(resources.GetObject("cboReturnBy.MaxDropDownItems")));
			this.cboReturnBy.MaxLength = ((int)(resources.GetObject("cboReturnBy.MaxLength")));
			this.cboReturnBy.Name = "cboReturnBy";
			this.cboReturnBy.RightToLeft = ((System.Windows.Forms.RightToLeft)(resources.GetObject("cboReturnBy.RightToLeft")));
			this.cboReturnBy.Size = ((System.Drawing.Size)(resources.GetObject("cboReturnBy.Size")));
			this.cboReturnBy.TabIndex = ((int)(resources.GetObject("cboReturnBy.TabIndex")));
			this.cboReturnBy.Text = resources.GetString("cboReturnBy.Text");
			this.cboReturnBy.Visible = ((bool)(resources.GetObject("cboReturnBy.Visible")));
			this.cboReturnBy.SelectedIndexChanged += new System.EventHandler(this.cboReturnBy_SelectedIndexChanged);
			// 
			// txtReturnNo
			// 
			this.txtReturnNo.AccessibleDescription = resources.GetString("txtReturnNo.AccessibleDescription");
			this.txtReturnNo.AccessibleName = resources.GetString("txtReturnNo.AccessibleName");
			this.txtReturnNo.Anchor = ((System.Windows.Forms.AnchorStyles)(resources.GetObject("txtReturnNo.Anchor")));
			this.txtReturnNo.AutoSize = ((bool)(resources.GetObject("txtReturnNo.AutoSize")));
			this.txtReturnNo.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("txtReturnNo.BackgroundImage")));
			this.txtReturnNo.Dock = ((System.Windows.Forms.DockStyle)(resources.GetObject("txtReturnNo.Dock")));
			this.txtReturnNo.Enabled = ((bool)(resources.GetObject("txtReturnNo.Enabled")));
			this.txtReturnNo.Font = ((System.Drawing.Font)(resources.GetObject("txtReturnNo.Font")));
			this.txtReturnNo.ImeMode = ((System.Windows.Forms.ImeMode)(resources.GetObject("txtReturnNo.ImeMode")));
			this.txtReturnNo.Location = ((System.Drawing.Point)(resources.GetObject("txtReturnNo.Location")));
			this.txtReturnNo.MaxLength = ((int)(resources.GetObject("txtReturnNo.MaxLength")));
			this.txtReturnNo.Multiline = ((bool)(resources.GetObject("txtReturnNo.Multiline")));
			this.txtReturnNo.Name = "txtReturnNo";
			this.txtReturnNo.PasswordChar = ((char)(resources.GetObject("txtReturnNo.PasswordChar")));
			this.txtReturnNo.RightToLeft = ((System.Windows.Forms.RightToLeft)(resources.GetObject("txtReturnNo.RightToLeft")));
			this.txtReturnNo.ScrollBars = ((System.Windows.Forms.ScrollBars)(resources.GetObject("txtReturnNo.ScrollBars")));
			this.txtReturnNo.Size = ((System.Drawing.Size)(resources.GetObject("txtReturnNo.Size")));
			this.txtReturnNo.TabIndex = ((int)(resources.GetObject("txtReturnNo.TabIndex")));
			this.txtReturnNo.Text = resources.GetString("txtReturnNo.Text");
			this.txtReturnNo.TextAlign = ((System.Windows.Forms.HorizontalAlignment)(resources.GetObject("txtReturnNo.TextAlign")));
			this.txtReturnNo.Visible = ((bool)(resources.GetObject("txtReturnNo.Visible")));
			this.txtReturnNo.WordWrap = ((bool)(resources.GetObject("txtReturnNo.WordWrap")));
			this.txtReturnNo.KeyDown += new System.Windows.Forms.KeyEventHandler(this.txtReturnNo_KeyDown);
			this.txtReturnNo.Validating += new System.ComponentModel.CancelEventHandler(this.txtReturnNo_Validating);
			// 
			// txtMasLoc
			// 
			this.txtMasLoc.AccessibleDescription = resources.GetString("txtMasLoc.AccessibleDescription");
			this.txtMasLoc.AccessibleName = resources.GetString("txtMasLoc.AccessibleName");
			this.txtMasLoc.Anchor = ((System.Windows.Forms.AnchorStyles)(resources.GetObject("txtMasLoc.Anchor")));
			this.txtMasLoc.AutoSize = ((bool)(resources.GetObject("txtMasLoc.AutoSize")));
			this.txtMasLoc.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("txtMasLoc.BackgroundImage")));
			this.txtMasLoc.Dock = ((System.Windows.Forms.DockStyle)(resources.GetObject("txtMasLoc.Dock")));
			this.txtMasLoc.Enabled = ((bool)(resources.GetObject("txtMasLoc.Enabled")));
			this.txtMasLoc.Font = ((System.Drawing.Font)(resources.GetObject("txtMasLoc.Font")));
			this.txtMasLoc.ImeMode = ((System.Windows.Forms.ImeMode)(resources.GetObject("txtMasLoc.ImeMode")));
			this.txtMasLoc.Location = ((System.Drawing.Point)(resources.GetObject("txtMasLoc.Location")));
			this.txtMasLoc.MaxLength = ((int)(resources.GetObject("txtMasLoc.MaxLength")));
			this.txtMasLoc.Multiline = ((bool)(resources.GetObject("txtMasLoc.Multiline")));
			this.txtMasLoc.Name = "txtMasLoc";
			this.txtMasLoc.PasswordChar = ((char)(resources.GetObject("txtMasLoc.PasswordChar")));
			this.txtMasLoc.RightToLeft = ((System.Windows.Forms.RightToLeft)(resources.GetObject("txtMasLoc.RightToLeft")));
			this.txtMasLoc.ScrollBars = ((System.Windows.Forms.ScrollBars)(resources.GetObject("txtMasLoc.ScrollBars")));
			this.txtMasLoc.Size = ((System.Drawing.Size)(resources.GetObject("txtMasLoc.Size")));
			this.txtMasLoc.TabIndex = ((int)(resources.GetObject("txtMasLoc.TabIndex")));
			this.txtMasLoc.Text = resources.GetString("txtMasLoc.Text");
			this.txtMasLoc.TextAlign = ((System.Windows.Forms.HorizontalAlignment)(resources.GetObject("txtMasLoc.TextAlign")));
			this.txtMasLoc.Visible = ((bool)(resources.GetObject("txtMasLoc.Visible")));
			this.txtMasLoc.WordWrap = ((bool)(resources.GetObject("txtMasLoc.WordWrap")));
			this.txtMasLoc.KeyDown += new System.Windows.Forms.KeyEventHandler(this.txtMasLoc_KeyDown);
			this.txtMasLoc.Validating += new System.ComponentModel.CancelEventHandler(this.txtMasLoc_Validating);
			// 
			// txtRefNo
			// 
			this.txtRefNo.AccessibleDescription = resources.GetString("txtRefNo.AccessibleDescription");
			this.txtRefNo.AccessibleName = resources.GetString("txtRefNo.AccessibleName");
			this.txtRefNo.Anchor = ((System.Windows.Forms.AnchorStyles)(resources.GetObject("txtRefNo.Anchor")));
			this.txtRefNo.AutoSize = ((bool)(resources.GetObject("txtRefNo.AutoSize")));
			this.txtRefNo.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("txtRefNo.BackgroundImage")));
			this.txtRefNo.Dock = ((System.Windows.Forms.DockStyle)(resources.GetObject("txtRefNo.Dock")));
			this.txtRefNo.Enabled = ((bool)(resources.GetObject("txtRefNo.Enabled")));
			this.txtRefNo.Font = ((System.Drawing.Font)(resources.GetObject("txtRefNo.Font")));
			this.txtRefNo.ImeMode = ((System.Windows.Forms.ImeMode)(resources.GetObject("txtRefNo.ImeMode")));
			this.txtRefNo.Location = ((System.Drawing.Point)(resources.GetObject("txtRefNo.Location")));
			this.txtRefNo.MaxLength = ((int)(resources.GetObject("txtRefNo.MaxLength")));
			this.txtRefNo.Multiline = ((bool)(resources.GetObject("txtRefNo.Multiline")));
			this.txtRefNo.Name = "txtRefNo";
			this.txtRefNo.PasswordChar = ((char)(resources.GetObject("txtRefNo.PasswordChar")));
			this.txtRefNo.RightToLeft = ((System.Windows.Forms.RightToLeft)(resources.GetObject("txtRefNo.RightToLeft")));
			this.txtRefNo.ScrollBars = ((System.Windows.Forms.ScrollBars)(resources.GetObject("txtRefNo.ScrollBars")));
			this.txtRefNo.Size = ((System.Drawing.Size)(resources.GetObject("txtRefNo.Size")));
			this.txtRefNo.TabIndex = ((int)(resources.GetObject("txtRefNo.TabIndex")));
			this.txtRefNo.Text = resources.GetString("txtRefNo.Text");
			this.txtRefNo.TextAlign = ((System.Windows.Forms.HorizontalAlignment)(resources.GetObject("txtRefNo.TextAlign")));
			this.txtRefNo.Visible = ((bool)(resources.GetObject("txtRefNo.Visible")));
			this.txtRefNo.WordWrap = ((bool)(resources.GetObject("txtRefNo.WordWrap")));
			this.txtRefNo.KeyDown += new System.Windows.Forms.KeyEventHandler(this.txtRefNo_KeyDown);
			this.txtRefNo.Validating += new System.ComponentModel.CancelEventHandler(this.txtRefNo_Validating);
			// 
			// txtProductionLine
			// 
			this.txtProductionLine.AccessibleDescription = resources.GetString("txtProductionLine.AccessibleDescription");
			this.txtProductionLine.AccessibleName = resources.GetString("txtProductionLine.AccessibleName");
			this.txtProductionLine.Anchor = ((System.Windows.Forms.AnchorStyles)(resources.GetObject("txtProductionLine.Anchor")));
			this.txtProductionLine.AutoSize = ((bool)(resources.GetObject("txtProductionLine.AutoSize")));
			this.txtProductionLine.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("txtProductionLine.BackgroundImage")));
			this.txtProductionLine.Dock = ((System.Windows.Forms.DockStyle)(resources.GetObject("txtProductionLine.Dock")));
			this.txtProductionLine.Enabled = ((bool)(resources.GetObject("txtProductionLine.Enabled")));
			this.txtProductionLine.Font = ((System.Drawing.Font)(resources.GetObject("txtProductionLine.Font")));
			this.txtProductionLine.ImeMode = ((System.Windows.Forms.ImeMode)(resources.GetObject("txtProductionLine.ImeMode")));
			this.txtProductionLine.Location = ((System.Drawing.Point)(resources.GetObject("txtProductionLine.Location")));
			this.txtProductionLine.MaxLength = ((int)(resources.GetObject("txtProductionLine.MaxLength")));
			this.txtProductionLine.Multiline = ((bool)(resources.GetObject("txtProductionLine.Multiline")));
			this.txtProductionLine.Name = "txtProductionLine";
			this.txtProductionLine.PasswordChar = ((char)(resources.GetObject("txtProductionLine.PasswordChar")));
			this.txtProductionLine.RightToLeft = ((System.Windows.Forms.RightToLeft)(resources.GetObject("txtProductionLine.RightToLeft")));
			this.txtProductionLine.ScrollBars = ((System.Windows.Forms.ScrollBars)(resources.GetObject("txtProductionLine.ScrollBars")));
			this.txtProductionLine.Size = ((System.Drawing.Size)(resources.GetObject("txtProductionLine.Size")));
			this.txtProductionLine.TabIndex = ((int)(resources.GetObject("txtProductionLine.TabIndex")));
			this.txtProductionLine.Text = resources.GetString("txtProductionLine.Text");
			this.txtProductionLine.TextAlign = ((System.Windows.Forms.HorizontalAlignment)(resources.GetObject("txtProductionLine.TextAlign")));
			this.txtProductionLine.Visible = ((bool)(resources.GetObject("txtProductionLine.Visible")));
			this.txtProductionLine.WordWrap = ((bool)(resources.GetObject("txtProductionLine.WordWrap")));
			this.txtProductionLine.KeyDown += new System.Windows.Forms.KeyEventHandler(this.txtProductionLine_KeyDown);
			this.txtProductionLine.Validating += new System.ComponentModel.CancelEventHandler(this.txtProductionLine_Validating);
			// 
			// txtVendorCode
			// 
			this.txtVendorCode.AccessibleDescription = resources.GetString("txtVendorCode.AccessibleDescription");
			this.txtVendorCode.AccessibleName = resources.GetString("txtVendorCode.AccessibleName");
			this.txtVendorCode.Anchor = ((System.Windows.Forms.AnchorStyles)(resources.GetObject("txtVendorCode.Anchor")));
			this.txtVendorCode.AutoSize = ((bool)(resources.GetObject("txtVendorCode.AutoSize")));
			this.txtVendorCode.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("txtVendorCode.BackgroundImage")));
			this.txtVendorCode.Dock = ((System.Windows.Forms.DockStyle)(resources.GetObject("txtVendorCode.Dock")));
			this.txtVendorCode.Enabled = ((bool)(resources.GetObject("txtVendorCode.Enabled")));
			this.txtVendorCode.Font = ((System.Drawing.Font)(resources.GetObject("txtVendorCode.Font")));
			this.txtVendorCode.ImeMode = ((System.Windows.Forms.ImeMode)(resources.GetObject("txtVendorCode.ImeMode")));
			this.txtVendorCode.Location = ((System.Drawing.Point)(resources.GetObject("txtVendorCode.Location")));
			this.txtVendorCode.MaxLength = ((int)(resources.GetObject("txtVendorCode.MaxLength")));
			this.txtVendorCode.Multiline = ((bool)(resources.GetObject("txtVendorCode.Multiline")));
			this.txtVendorCode.Name = "txtVendorCode";
			this.txtVendorCode.PasswordChar = ((char)(resources.GetObject("txtVendorCode.PasswordChar")));
			this.txtVendorCode.RightToLeft = ((System.Windows.Forms.RightToLeft)(resources.GetObject("txtVendorCode.RightToLeft")));
			this.txtVendorCode.ScrollBars = ((System.Windows.Forms.ScrollBars)(resources.GetObject("txtVendorCode.ScrollBars")));
			this.txtVendorCode.Size = ((System.Drawing.Size)(resources.GetObject("txtVendorCode.Size")));
			this.txtVendorCode.TabIndex = ((int)(resources.GetObject("txtVendorCode.TabIndex")));
			this.txtVendorCode.Text = resources.GetString("txtVendorCode.Text");
			this.txtVendorCode.TextAlign = ((System.Windows.Forms.HorizontalAlignment)(resources.GetObject("txtVendorCode.TextAlign")));
			this.txtVendorCode.Visible = ((bool)(resources.GetObject("txtVendorCode.Visible")));
			this.txtVendorCode.WordWrap = ((bool)(resources.GetObject("txtVendorCode.WordWrap")));
			this.txtVendorCode.KeyDown += new System.Windows.Forms.KeyEventHandler(this.txtVendorCode_KeyDown);
			this.txtVendorCode.Validating += new System.ComponentModel.CancelEventHandler(this.txtVendorCode_Validating);
			// 
			// txtVendorName
			// 
			this.txtVendorName.AccessibleDescription = resources.GetString("txtVendorName.AccessibleDescription");
			this.txtVendorName.AccessibleName = resources.GetString("txtVendorName.AccessibleName");
			this.txtVendorName.Anchor = ((System.Windows.Forms.AnchorStyles)(resources.GetObject("txtVendorName.Anchor")));
			this.txtVendorName.AutoSize = ((bool)(resources.GetObject("txtVendorName.AutoSize")));
			this.txtVendorName.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("txtVendorName.BackgroundImage")));
			this.txtVendorName.Dock = ((System.Windows.Forms.DockStyle)(resources.GetObject("txtVendorName.Dock")));
			this.txtVendorName.Enabled = ((bool)(resources.GetObject("txtVendorName.Enabled")));
			this.txtVendorName.Font = ((System.Drawing.Font)(resources.GetObject("txtVendorName.Font")));
			this.txtVendorName.ImeMode = ((System.Windows.Forms.ImeMode)(resources.GetObject("txtVendorName.ImeMode")));
			this.txtVendorName.Location = ((System.Drawing.Point)(resources.GetObject("txtVendorName.Location")));
			this.txtVendorName.MaxLength = ((int)(resources.GetObject("txtVendorName.MaxLength")));
			this.txtVendorName.Multiline = ((bool)(resources.GetObject("txtVendorName.Multiline")));
			this.txtVendorName.Name = "txtVendorName";
			this.txtVendorName.PasswordChar = ((char)(resources.GetObject("txtVendorName.PasswordChar")));
			this.txtVendorName.ReadOnly = true;
			this.txtVendorName.RightToLeft = ((System.Windows.Forms.RightToLeft)(resources.GetObject("txtVendorName.RightToLeft")));
			this.txtVendorName.ScrollBars = ((System.Windows.Forms.ScrollBars)(resources.GetObject("txtVendorName.ScrollBars")));
			this.txtVendorName.Size = ((System.Drawing.Size)(resources.GetObject("txtVendorName.Size")));
			this.txtVendorName.TabIndex = ((int)(resources.GetObject("txtVendorName.TabIndex")));
			this.txtVendorName.Text = resources.GetString("txtVendorName.Text");
			this.txtVendorName.TextAlign = ((System.Windows.Forms.HorizontalAlignment)(resources.GetObject("txtVendorName.TextAlign")));
			this.txtVendorName.Visible = ((bool)(resources.GetObject("txtVendorName.Visible")));
			this.txtVendorName.WordWrap = ((bool)(resources.GetObject("txtVendorName.WordWrap")));
			// 
			// txtVendorLoc
			// 
			this.txtVendorLoc.AccessibleDescription = resources.GetString("txtVendorLoc.AccessibleDescription");
			this.txtVendorLoc.AccessibleName = resources.GetString("txtVendorLoc.AccessibleName");
			this.txtVendorLoc.Anchor = ((System.Windows.Forms.AnchorStyles)(resources.GetObject("txtVendorLoc.Anchor")));
			this.txtVendorLoc.AutoSize = ((bool)(resources.GetObject("txtVendorLoc.AutoSize")));
			this.txtVendorLoc.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("txtVendorLoc.BackgroundImage")));
			this.txtVendorLoc.Dock = ((System.Windows.Forms.DockStyle)(resources.GetObject("txtVendorLoc.Dock")));
			this.txtVendorLoc.Enabled = ((bool)(resources.GetObject("txtVendorLoc.Enabled")));
			this.txtVendorLoc.Font = ((System.Drawing.Font)(resources.GetObject("txtVendorLoc.Font")));
			this.txtVendorLoc.ImeMode = ((System.Windows.Forms.ImeMode)(resources.GetObject("txtVendorLoc.ImeMode")));
			this.txtVendorLoc.Location = ((System.Drawing.Point)(resources.GetObject("txtVendorLoc.Location")));
			this.txtVendorLoc.MaxLength = ((int)(resources.GetObject("txtVendorLoc.MaxLength")));
			this.txtVendorLoc.Multiline = ((bool)(resources.GetObject("txtVendorLoc.Multiline")));
			this.txtVendorLoc.Name = "txtVendorLoc";
			this.txtVendorLoc.PasswordChar = ((char)(resources.GetObject("txtVendorLoc.PasswordChar")));
			this.txtVendorLoc.RightToLeft = ((System.Windows.Forms.RightToLeft)(resources.GetObject("txtVendorLoc.RightToLeft")));
			this.txtVendorLoc.ScrollBars = ((System.Windows.Forms.ScrollBars)(resources.GetObject("txtVendorLoc.ScrollBars")));
			this.txtVendorLoc.Size = ((System.Drawing.Size)(resources.GetObject("txtVendorLoc.Size")));
			this.txtVendorLoc.TabIndex = ((int)(resources.GetObject("txtVendorLoc.TabIndex")));
			this.txtVendorLoc.Text = resources.GetString("txtVendorLoc.Text");
			this.txtVendorLoc.TextAlign = ((System.Windows.Forms.HorizontalAlignment)(resources.GetObject("txtVendorLoc.TextAlign")));
			this.txtVendorLoc.Visible = ((bool)(resources.GetObject("txtVendorLoc.Visible")));
			this.txtVendorLoc.WordWrap = ((bool)(resources.GetObject("txtVendorLoc.WordWrap")));
			this.txtVendorLoc.KeyDown += new System.Windows.Forms.KeyEventHandler(this.txtVendorLoc_KeyDown);
			this.txtVendorLoc.Validating += new System.ComponentModel.CancelEventHandler(this.txtVendorLoc_Validating);
			// 
			// btnReturnNo
			// 
			this.btnReturnNo.AccessibleDescription = resources.GetString("btnReturnNo.AccessibleDescription");
			this.btnReturnNo.AccessibleName = resources.GetString("btnReturnNo.AccessibleName");
			this.btnReturnNo.Anchor = ((System.Windows.Forms.AnchorStyles)(resources.GetObject("btnReturnNo.Anchor")));
			this.btnReturnNo.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("btnReturnNo.BackgroundImage")));
			this.btnReturnNo.Dock = ((System.Windows.Forms.DockStyle)(resources.GetObject("btnReturnNo.Dock")));
			this.btnReturnNo.Enabled = ((bool)(resources.GetObject("btnReturnNo.Enabled")));
			this.btnReturnNo.FlatStyle = ((System.Windows.Forms.FlatStyle)(resources.GetObject("btnReturnNo.FlatStyle")));
			this.btnReturnNo.Font = ((System.Drawing.Font)(resources.GetObject("btnReturnNo.Font")));
			this.btnReturnNo.Image = ((System.Drawing.Image)(resources.GetObject("btnReturnNo.Image")));
			this.btnReturnNo.ImageAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("btnReturnNo.ImageAlign")));
			this.btnReturnNo.ImageIndex = ((int)(resources.GetObject("btnReturnNo.ImageIndex")));
			this.btnReturnNo.ImeMode = ((System.Windows.Forms.ImeMode)(resources.GetObject("btnReturnNo.ImeMode")));
			this.btnReturnNo.Location = ((System.Drawing.Point)(resources.GetObject("btnReturnNo.Location")));
			this.btnReturnNo.Name = "btnReturnNo";
			this.btnReturnNo.RightToLeft = ((System.Windows.Forms.RightToLeft)(resources.GetObject("btnReturnNo.RightToLeft")));
			this.btnReturnNo.Size = ((System.Drawing.Size)(resources.GetObject("btnReturnNo.Size")));
			this.btnReturnNo.TabIndex = ((int)(resources.GetObject("btnReturnNo.TabIndex")));
			this.btnReturnNo.Text = resources.GetString("btnReturnNo.Text");
			this.btnReturnNo.TextAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("btnReturnNo.TextAlign")));
			this.btnReturnNo.Visible = ((bool)(resources.GetObject("btnReturnNo.Visible")));
			this.btnReturnNo.Click += new System.EventHandler(this.btnReturnNo_Click);
			// 
			// btnMasLoc
			// 
			this.btnMasLoc.AccessibleDescription = resources.GetString("btnMasLoc.AccessibleDescription");
			this.btnMasLoc.AccessibleName = resources.GetString("btnMasLoc.AccessibleName");
			this.btnMasLoc.Anchor = ((System.Windows.Forms.AnchorStyles)(resources.GetObject("btnMasLoc.Anchor")));
			this.btnMasLoc.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("btnMasLoc.BackgroundImage")));
			this.btnMasLoc.Dock = ((System.Windows.Forms.DockStyle)(resources.GetObject("btnMasLoc.Dock")));
			this.btnMasLoc.Enabled = ((bool)(resources.GetObject("btnMasLoc.Enabled")));
			this.btnMasLoc.FlatStyle = ((System.Windows.Forms.FlatStyle)(resources.GetObject("btnMasLoc.FlatStyle")));
			this.btnMasLoc.Font = ((System.Drawing.Font)(resources.GetObject("btnMasLoc.Font")));
			this.btnMasLoc.Image = ((System.Drawing.Image)(resources.GetObject("btnMasLoc.Image")));
			this.btnMasLoc.ImageAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("btnMasLoc.ImageAlign")));
			this.btnMasLoc.ImageIndex = ((int)(resources.GetObject("btnMasLoc.ImageIndex")));
			this.btnMasLoc.ImeMode = ((System.Windows.Forms.ImeMode)(resources.GetObject("btnMasLoc.ImeMode")));
			this.btnMasLoc.Location = ((System.Drawing.Point)(resources.GetObject("btnMasLoc.Location")));
			this.btnMasLoc.Name = "btnMasLoc";
			this.btnMasLoc.RightToLeft = ((System.Windows.Forms.RightToLeft)(resources.GetObject("btnMasLoc.RightToLeft")));
			this.btnMasLoc.Size = ((System.Drawing.Size)(resources.GetObject("btnMasLoc.Size")));
			this.btnMasLoc.TabIndex = ((int)(resources.GetObject("btnMasLoc.TabIndex")));
			this.btnMasLoc.Text = resources.GetString("btnMasLoc.Text");
			this.btnMasLoc.TextAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("btnMasLoc.TextAlign")));
			this.btnMasLoc.Visible = ((bool)(resources.GetObject("btnMasLoc.Visible")));
			this.btnMasLoc.Click += new System.EventHandler(this.btnMasLoc_Click);
			// 
			// btnRefNo
			// 
			this.btnRefNo.AccessibleDescription = resources.GetString("btnRefNo.AccessibleDescription");
			this.btnRefNo.AccessibleName = resources.GetString("btnRefNo.AccessibleName");
			this.btnRefNo.Anchor = ((System.Windows.Forms.AnchorStyles)(resources.GetObject("btnRefNo.Anchor")));
			this.btnRefNo.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("btnRefNo.BackgroundImage")));
			this.btnRefNo.Dock = ((System.Windows.Forms.DockStyle)(resources.GetObject("btnRefNo.Dock")));
			this.btnRefNo.Enabled = ((bool)(resources.GetObject("btnRefNo.Enabled")));
			this.btnRefNo.FlatStyle = ((System.Windows.Forms.FlatStyle)(resources.GetObject("btnRefNo.FlatStyle")));
			this.btnRefNo.Font = ((System.Drawing.Font)(resources.GetObject("btnRefNo.Font")));
			this.btnRefNo.Image = ((System.Drawing.Image)(resources.GetObject("btnRefNo.Image")));
			this.btnRefNo.ImageAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("btnRefNo.ImageAlign")));
			this.btnRefNo.ImageIndex = ((int)(resources.GetObject("btnRefNo.ImageIndex")));
			this.btnRefNo.ImeMode = ((System.Windows.Forms.ImeMode)(resources.GetObject("btnRefNo.ImeMode")));
			this.btnRefNo.Location = ((System.Drawing.Point)(resources.GetObject("btnRefNo.Location")));
			this.btnRefNo.Name = "btnRefNo";
			this.btnRefNo.RightToLeft = ((System.Windows.Forms.RightToLeft)(resources.GetObject("btnRefNo.RightToLeft")));
			this.btnRefNo.Size = ((System.Drawing.Size)(resources.GetObject("btnRefNo.Size")));
			this.btnRefNo.TabIndex = ((int)(resources.GetObject("btnRefNo.TabIndex")));
			this.btnRefNo.Text = resources.GetString("btnRefNo.Text");
			this.btnRefNo.TextAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("btnRefNo.TextAlign")));
			this.btnRefNo.Visible = ((bool)(resources.GetObject("btnRefNo.Visible")));
			this.btnRefNo.Click += new System.EventHandler(this.btnRefNo_Click);
			// 
			// btnProductionLine
			// 
			this.btnProductionLine.AccessibleDescription = resources.GetString("btnProductionLine.AccessibleDescription");
			this.btnProductionLine.AccessibleName = resources.GetString("btnProductionLine.AccessibleName");
			this.btnProductionLine.Anchor = ((System.Windows.Forms.AnchorStyles)(resources.GetObject("btnProductionLine.Anchor")));
			this.btnProductionLine.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("btnProductionLine.BackgroundImage")));
			this.btnProductionLine.Dock = ((System.Windows.Forms.DockStyle)(resources.GetObject("btnProductionLine.Dock")));
			this.btnProductionLine.Enabled = ((bool)(resources.GetObject("btnProductionLine.Enabled")));
			this.btnProductionLine.FlatStyle = ((System.Windows.Forms.FlatStyle)(resources.GetObject("btnProductionLine.FlatStyle")));
			this.btnProductionLine.Font = ((System.Drawing.Font)(resources.GetObject("btnProductionLine.Font")));
			this.btnProductionLine.Image = ((System.Drawing.Image)(resources.GetObject("btnProductionLine.Image")));
			this.btnProductionLine.ImageAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("btnProductionLine.ImageAlign")));
			this.btnProductionLine.ImageIndex = ((int)(resources.GetObject("btnProductionLine.ImageIndex")));
			this.btnProductionLine.ImeMode = ((System.Windows.Forms.ImeMode)(resources.GetObject("btnProductionLine.ImeMode")));
			this.btnProductionLine.Location = ((System.Drawing.Point)(resources.GetObject("btnProductionLine.Location")));
			this.btnProductionLine.Name = "btnProductionLine";
			this.btnProductionLine.RightToLeft = ((System.Windows.Forms.RightToLeft)(resources.GetObject("btnProductionLine.RightToLeft")));
			this.btnProductionLine.Size = ((System.Drawing.Size)(resources.GetObject("btnProductionLine.Size")));
			this.btnProductionLine.TabIndex = ((int)(resources.GetObject("btnProductionLine.TabIndex")));
			this.btnProductionLine.Text = resources.GetString("btnProductionLine.Text");
			this.btnProductionLine.TextAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("btnProductionLine.TextAlign")));
			this.btnProductionLine.Visible = ((bool)(resources.GetObject("btnProductionLine.Visible")));
			this.btnProductionLine.Click += new System.EventHandler(this.btnProductionLine_Click);
			// 
			// btnVendorCode
			// 
			this.btnVendorCode.AccessibleDescription = resources.GetString("btnVendorCode.AccessibleDescription");
			this.btnVendorCode.AccessibleName = resources.GetString("btnVendorCode.AccessibleName");
			this.btnVendorCode.Anchor = ((System.Windows.Forms.AnchorStyles)(resources.GetObject("btnVendorCode.Anchor")));
			this.btnVendorCode.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("btnVendorCode.BackgroundImage")));
			this.btnVendorCode.Dock = ((System.Windows.Forms.DockStyle)(resources.GetObject("btnVendorCode.Dock")));
			this.btnVendorCode.Enabled = ((bool)(resources.GetObject("btnVendorCode.Enabled")));
			this.btnVendorCode.FlatStyle = ((System.Windows.Forms.FlatStyle)(resources.GetObject("btnVendorCode.FlatStyle")));
			this.btnVendorCode.Font = ((System.Drawing.Font)(resources.GetObject("btnVendorCode.Font")));
			this.btnVendorCode.Image = ((System.Drawing.Image)(resources.GetObject("btnVendorCode.Image")));
			this.btnVendorCode.ImageAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("btnVendorCode.ImageAlign")));
			this.btnVendorCode.ImageIndex = ((int)(resources.GetObject("btnVendorCode.ImageIndex")));
			this.btnVendorCode.ImeMode = ((System.Windows.Forms.ImeMode)(resources.GetObject("btnVendorCode.ImeMode")));
			this.btnVendorCode.Location = ((System.Drawing.Point)(resources.GetObject("btnVendorCode.Location")));
			this.btnVendorCode.Name = "btnVendorCode";
			this.btnVendorCode.RightToLeft = ((System.Windows.Forms.RightToLeft)(resources.GetObject("btnVendorCode.RightToLeft")));
			this.btnVendorCode.Size = ((System.Drawing.Size)(resources.GetObject("btnVendorCode.Size")));
			this.btnVendorCode.TabIndex = ((int)(resources.GetObject("btnVendorCode.TabIndex")));
			this.btnVendorCode.Text = resources.GetString("btnVendorCode.Text");
			this.btnVendorCode.TextAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("btnVendorCode.TextAlign")));
			this.btnVendorCode.Visible = ((bool)(resources.GetObject("btnVendorCode.Visible")));
			this.btnVendorCode.Click += new System.EventHandler(this.btnVendorCode_Click);
			// 
			// btnVendorLoc
			// 
			this.btnVendorLoc.AccessibleDescription = resources.GetString("btnVendorLoc.AccessibleDescription");
			this.btnVendorLoc.AccessibleName = resources.GetString("btnVendorLoc.AccessibleName");
			this.btnVendorLoc.Anchor = ((System.Windows.Forms.AnchorStyles)(resources.GetObject("btnVendorLoc.Anchor")));
			this.btnVendorLoc.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("btnVendorLoc.BackgroundImage")));
			this.btnVendorLoc.Dock = ((System.Windows.Forms.DockStyle)(resources.GetObject("btnVendorLoc.Dock")));
			this.btnVendorLoc.Enabled = ((bool)(resources.GetObject("btnVendorLoc.Enabled")));
			this.btnVendorLoc.FlatStyle = ((System.Windows.Forms.FlatStyle)(resources.GetObject("btnVendorLoc.FlatStyle")));
			this.btnVendorLoc.Font = ((System.Drawing.Font)(resources.GetObject("btnVendorLoc.Font")));
			this.btnVendorLoc.Image = ((System.Drawing.Image)(resources.GetObject("btnVendorLoc.Image")));
			this.btnVendorLoc.ImageAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("btnVendorLoc.ImageAlign")));
			this.btnVendorLoc.ImageIndex = ((int)(resources.GetObject("btnVendorLoc.ImageIndex")));
			this.btnVendorLoc.ImeMode = ((System.Windows.Forms.ImeMode)(resources.GetObject("btnVendorLoc.ImeMode")));
			this.btnVendorLoc.Location = ((System.Drawing.Point)(resources.GetObject("btnVendorLoc.Location")));
			this.btnVendorLoc.Name = "btnVendorLoc";
			this.btnVendorLoc.RightToLeft = ((System.Windows.Forms.RightToLeft)(resources.GetObject("btnVendorLoc.RightToLeft")));
			this.btnVendorLoc.Size = ((System.Drawing.Size)(resources.GetObject("btnVendorLoc.Size")));
			this.btnVendorLoc.TabIndex = ((int)(resources.GetObject("btnVendorLoc.TabIndex")));
			this.btnVendorLoc.Text = resources.GetString("btnVendorLoc.Text");
			this.btnVendorLoc.TextAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("btnVendorLoc.TextAlign")));
			this.btnVendorLoc.Visible = ((bool)(resources.GetObject("btnVendorLoc.Visible")));
			this.btnVendorLoc.Click += new System.EventHandler(this.btnVendorLoc_Click);
			// 
			// cboCCN
			// 
			this.cboCCN.AccessibleDescription = resources.GetString("cboCCN.AccessibleDescription");
			this.cboCCN.AccessibleName = resources.GetString("cboCCN.AccessibleName");
			this.cboCCN.AddItemSeparator = ';';
			this.cboCCN.AllowRowSizing = C1.Win.C1List.RowSizingEnum.AllRows;
			this.cboCCN.Anchor = ((System.Windows.Forms.AnchorStyles)(resources.GetObject("cboCCN.Anchor")));
			this.cboCCN.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("cboCCN.BackgroundImage")));
			this.cboCCN.Caption = "";
			this.cboCCN.CaptionHeight = 17;
			this.cboCCN.CharacterCasing = System.Windows.Forms.CharacterCasing.Normal;
			this.cboCCN.ColumnCaptionHeight = 17;
			this.cboCCN.ColumnFooterHeight = 17;
			this.cboCCN.ComboStyle = C1.Win.C1List.ComboStyleEnum.DropdownList;
			this.cboCCN.ContentHeight = 15;
			this.cboCCN.DeadAreaBackColor = System.Drawing.Color.Empty;
			this.cboCCN.Dock = ((System.Windows.Forms.DockStyle)(resources.GetObject("cboCCN.Dock")));
			this.cboCCN.DropDownWidth = 200;
			this.cboCCN.EditorBackColor = System.Drawing.SystemColors.Window;
			this.cboCCN.EditorFont = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
			this.cboCCN.EditorForeColor = System.Drawing.SystemColors.WindowText;
			this.cboCCN.EditorHeight = 15;
			this.cboCCN.Enabled = ((bool)(resources.GetObject("cboCCN.Enabled")));
			this.cboCCN.FlatStyle = C1.Win.C1List.FlatModeEnum.System;
			this.cboCCN.Font = ((System.Drawing.Font)(resources.GetObject("cboCCN.Font")));
			this.cboCCN.GapHeight = 2;
			this.cboCCN.ImeMode = ((System.Windows.Forms.ImeMode)(resources.GetObject("cboCCN.ImeMode")));
			this.cboCCN.ItemHeight = 15;
			this.cboCCN.Location = ((System.Drawing.Point)(resources.GetObject("cboCCN.Location")));
			this.cboCCN.MatchEntryTimeout = ((long)(2000));
			this.cboCCN.MaxDropDownItems = ((short)(5));
			this.cboCCN.MaxLength = 32767;
			this.cboCCN.MouseCursor = System.Windows.Forms.Cursors.Default;
			this.cboCCN.Name = "cboCCN";
			this.cboCCN.PartialRightColumn = false;
			this.cboCCN.RightToLeft = ((System.Windows.Forms.RightToLeft)(resources.GetObject("cboCCN.RightToLeft")));
			this.cboCCN.RowDivider.Color = System.Drawing.Color.DarkGray;
			this.cboCCN.RowDivider.Style = C1.Win.C1List.LineStyleEnum.None;
			this.cboCCN.RowSubDividerColor = System.Drawing.Color.DarkGray;
			this.cboCCN.Size = ((System.Drawing.Size)(resources.GetObject("cboCCN.Size")));
			this.cboCCN.TabIndex = ((int)(resources.GetObject("cboCCN.TabIndex")));
			this.cboCCN.Text = resources.GetString("cboCCN.Text");
			this.cboCCN.Visible = ((bool)(resources.GetObject("cboCCN.Visible")));
			this.cboCCN.PropBag = "<?xml version=\"1.0\"?><Blob><Styles type=\"C1.Win.C1List.Design.ContextWrapper\"><Da" +
				"ta>Group{BackColor:ControlDark;Border:None,,0, 0, 0, 0;AlignVert:Center;}Style2{" +
				"}Style5{}Style4{}Style7{}Style6{}EvenRow{BackColor:Aqua;}Selected{ForeColor:High" +
				"lightText;BackColor:Highlight;}Style3{}Inactive{ForeColor:InactiveCaptionText;Ba" +
				"ckColor:InactiveCaption;}Footer{}Caption{AlignHorz:Center;}Normal{BackColor:Wind" +
				"ow;}HighlightRow{ForeColor:HighlightText;BackColor:Highlight;}Style9{AlignHorz:N" +
				"ear;}OddRow{}RecordSelector{AlignImage:Center;}Heading{Wrap:True;AlignVert:Cente" +
				"r;Border:Raised,,1, 1, 1, 1;ForeColor:ControlText;BackColor:Control;}Style8{}Sty" +
				"le10{}Style11{}Style1{}</Data></Styles><Splits><C1.Win.C1List.ListBoxView AllowC" +
				"olSelect=\"False\" Name=\"\" CaptionHeight=\"17\" ColumnCaptionHeight=\"17\" ColumnFoote" +
				"rHeight=\"17\" VerticalScrollGroup=\"1\" HorizontalScrollGroup=\"1\"><ClientRect>0, 0," +
				" 116, 156</ClientRect><VScrollBar><Width>16</Width></VScrollBar><HScrollBar><Hei" +
				"ght>16</Height></HScrollBar><CaptionStyle parent=\"Style2\" me=\"Style9\" /><EvenRow" +
				"Style parent=\"EvenRow\" me=\"Style7\" /><FooterStyle parent=\"Footer\" me=\"Style3\" />" +
				"<GroupStyle parent=\"Group\" me=\"Style11\" /><HeadingStyle parent=\"Heading\" me=\"Sty" +
				"le2\" /><HighLightRowStyle parent=\"HighlightRow\" me=\"Style6\" /><InactiveStyle par" +
				"ent=\"Inactive\" me=\"Style4\" /><OddRowStyle parent=\"OddRow\" me=\"Style8\" /><RecordS" +
				"electorStyle parent=\"RecordSelector\" me=\"Style10\" /><SelectedStyle parent=\"Selec" +
				"ted\" me=\"Style5\" /><Style parent=\"Normal\" me=\"Style1\" /></C1.Win.C1List.ListBoxV" +
				"iew></Splits><NamedStyles><Style parent=\"\" me=\"Normal\" /><Style parent=\"Normal\" " +
				"me=\"Heading\" /><Style parent=\"Heading\" me=\"Footer\" /><Style parent=\"Heading\" me=" +
				"\"Caption\" /><Style parent=\"Heading\" me=\"Inactive\" /><Style parent=\"Normal\" me=\"S" +
				"elected\" /><Style parent=\"Normal\" me=\"HighlightRow\" /><Style parent=\"Normal\" me=" +
				"\"EvenRow\" /><Style parent=\"Normal\" me=\"OddRow\" /><Style parent=\"Heading\" me=\"Rec" +
				"ordSelector\" /><Style parent=\"Caption\" me=\"Group\" /></NamedStyles><vertSplits>1<" +
				"/vertSplits><horzSplits>1</horzSplits><Layout>Modified</Layout><DefaultRecSelWid" +
				"th>16</DefaultRecSelWidth></Blob>";
			// 
			// lblCCN
			// 
			this.lblCCN.AccessibleDescription = resources.GetString("lblCCN.AccessibleDescription");
			this.lblCCN.AccessibleName = resources.GetString("lblCCN.AccessibleName");
			this.lblCCN.Anchor = ((System.Windows.Forms.AnchorStyles)(resources.GetObject("lblCCN.Anchor")));
			this.lblCCN.AutoSize = ((bool)(resources.GetObject("lblCCN.AutoSize")));
			this.lblCCN.Dock = ((System.Windows.Forms.DockStyle)(resources.GetObject("lblCCN.Dock")));
			this.lblCCN.Enabled = ((bool)(resources.GetObject("lblCCN.Enabled")));
			this.lblCCN.Font = ((System.Drawing.Font)(resources.GetObject("lblCCN.Font")));
			this.lblCCN.ForeColor = System.Drawing.Color.Maroon;
			this.lblCCN.Image = ((System.Drawing.Image)(resources.GetObject("lblCCN.Image")));
			this.lblCCN.ImageAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("lblCCN.ImageAlign")));
			this.lblCCN.ImageIndex = ((int)(resources.GetObject("lblCCN.ImageIndex")));
			this.lblCCN.ImeMode = ((System.Windows.Forms.ImeMode)(resources.GetObject("lblCCN.ImeMode")));
			this.lblCCN.Location = ((System.Drawing.Point)(resources.GetObject("lblCCN.Location")));
			this.lblCCN.Name = "lblCCN";
			this.lblCCN.RightToLeft = ((System.Windows.Forms.RightToLeft)(resources.GetObject("lblCCN.RightToLeft")));
			this.lblCCN.Size = ((System.Drawing.Size)(resources.GetObject("lblCCN.Size")));
			this.lblCCN.TabIndex = ((int)(resources.GetObject("lblCCN.TabIndex")));
			this.lblCCN.Text = resources.GetString("lblCCN.Text");
			this.lblCCN.TextAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("lblCCN.TextAlign")));
			this.lblCCN.Visible = ((bool)(resources.GetObject("lblCCN.Visible")));
			// 
			// btnClose
			// 
			this.btnClose.AccessibleDescription = resources.GetString("btnClose.AccessibleDescription");
			this.btnClose.AccessibleName = resources.GetString("btnClose.AccessibleName");
			this.btnClose.Anchor = ((System.Windows.Forms.AnchorStyles)(resources.GetObject("btnClose.Anchor")));
			this.btnClose.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("btnClose.BackgroundImage")));
			this.btnClose.DialogResult = System.Windows.Forms.DialogResult.Cancel;
			this.btnClose.Dock = ((System.Windows.Forms.DockStyle)(resources.GetObject("btnClose.Dock")));
			this.btnClose.Enabled = ((bool)(resources.GetObject("btnClose.Enabled")));
			this.btnClose.FlatStyle = ((System.Windows.Forms.FlatStyle)(resources.GetObject("btnClose.FlatStyle")));
			this.btnClose.Font = ((System.Drawing.Font)(resources.GetObject("btnClose.Font")));
			this.btnClose.Image = ((System.Drawing.Image)(resources.GetObject("btnClose.Image")));
			this.btnClose.ImageAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("btnClose.ImageAlign")));
			this.btnClose.ImageIndex = ((int)(resources.GetObject("btnClose.ImageIndex")));
			this.btnClose.ImeMode = ((System.Windows.Forms.ImeMode)(resources.GetObject("btnClose.ImeMode")));
			this.btnClose.Location = ((System.Drawing.Point)(resources.GetObject("btnClose.Location")));
			this.btnClose.Name = "btnClose";
			this.btnClose.RightToLeft = ((System.Windows.Forms.RightToLeft)(resources.GetObject("btnClose.RightToLeft")));
			this.btnClose.Size = ((System.Drawing.Size)(resources.GetObject("btnClose.Size")));
			this.btnClose.TabIndex = ((int)(resources.GetObject("btnClose.TabIndex")));
			this.btnClose.Text = resources.GetString("btnClose.Text");
			this.btnClose.TextAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("btnClose.TextAlign")));
			this.btnClose.Visible = ((bool)(resources.GetObject("btnClose.Visible")));
			this.btnClose.Click += new System.EventHandler(this.btnClose_Click);
			// 
			// btnHelp
			// 
			this.btnHelp.AccessibleDescription = resources.GetString("btnHelp.AccessibleDescription");
			this.btnHelp.AccessibleName = resources.GetString("btnHelp.AccessibleName");
			this.btnHelp.Anchor = ((System.Windows.Forms.AnchorStyles)(resources.GetObject("btnHelp.Anchor")));
			this.btnHelp.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("btnHelp.BackgroundImage")));
			this.btnHelp.Dock = ((System.Windows.Forms.DockStyle)(resources.GetObject("btnHelp.Dock")));
			this.btnHelp.Enabled = ((bool)(resources.GetObject("btnHelp.Enabled")));
			this.btnHelp.FlatStyle = ((System.Windows.Forms.FlatStyle)(resources.GetObject("btnHelp.FlatStyle")));
			this.btnHelp.Font = ((System.Drawing.Font)(resources.GetObject("btnHelp.Font")));
			this.btnHelp.Image = ((System.Drawing.Image)(resources.GetObject("btnHelp.Image")));
			this.btnHelp.ImageAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("btnHelp.ImageAlign")));
			this.btnHelp.ImageIndex = ((int)(resources.GetObject("btnHelp.ImageIndex")));
			this.btnHelp.ImeMode = ((System.Windows.Forms.ImeMode)(resources.GetObject("btnHelp.ImeMode")));
			this.btnHelp.Location = ((System.Drawing.Point)(resources.GetObject("btnHelp.Location")));
			this.btnHelp.Name = "btnHelp";
			this.btnHelp.RightToLeft = ((System.Windows.Forms.RightToLeft)(resources.GetObject("btnHelp.RightToLeft")));
			this.btnHelp.Size = ((System.Drawing.Size)(resources.GetObject("btnHelp.Size")));
			this.btnHelp.TabIndex = ((int)(resources.GetObject("btnHelp.TabIndex")));
			this.btnHelp.Text = resources.GetString("btnHelp.Text");
			this.btnHelp.TextAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("btnHelp.TextAlign")));
			this.btnHelp.Visible = ((bool)(resources.GetObject("btnHelp.Visible")));
			this.btnHelp.Click += new System.EventHandler(this.btnHelp_Click);
			// 
			// btnDelete
			// 
			this.btnDelete.AccessibleDescription = resources.GetString("btnDelete.AccessibleDescription");
			this.btnDelete.AccessibleName = resources.GetString("btnDelete.AccessibleName");
			this.btnDelete.Anchor = ((System.Windows.Forms.AnchorStyles)(resources.GetObject("btnDelete.Anchor")));
			this.btnDelete.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("btnDelete.BackgroundImage")));
			this.btnDelete.Dock = ((System.Windows.Forms.DockStyle)(resources.GetObject("btnDelete.Dock")));
			this.btnDelete.Enabled = ((bool)(resources.GetObject("btnDelete.Enabled")));
			this.btnDelete.FlatStyle = ((System.Windows.Forms.FlatStyle)(resources.GetObject("btnDelete.FlatStyle")));
			this.btnDelete.Font = ((System.Drawing.Font)(resources.GetObject("btnDelete.Font")));
			this.btnDelete.Image = ((System.Drawing.Image)(resources.GetObject("btnDelete.Image")));
			this.btnDelete.ImageAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("btnDelete.ImageAlign")));
			this.btnDelete.ImageIndex = ((int)(resources.GetObject("btnDelete.ImageIndex")));
			this.btnDelete.ImeMode = ((System.Windows.Forms.ImeMode)(resources.GetObject("btnDelete.ImeMode")));
			this.btnDelete.Location = ((System.Drawing.Point)(resources.GetObject("btnDelete.Location")));
			this.btnDelete.Name = "btnDelete";
			this.btnDelete.RightToLeft = ((System.Windows.Forms.RightToLeft)(resources.GetObject("btnDelete.RightToLeft")));
			this.btnDelete.Size = ((System.Drawing.Size)(resources.GetObject("btnDelete.Size")));
			this.btnDelete.TabIndex = ((int)(resources.GetObject("btnDelete.TabIndex")));
			this.btnDelete.Text = resources.GetString("btnDelete.Text");
			this.btnDelete.TextAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("btnDelete.TextAlign")));
			this.btnDelete.Visible = ((bool)(resources.GetObject("btnDelete.Visible")));
			this.btnDelete.Click += new System.EventHandler(this.btnDelete_Click);
			// 
			// btnSave
			// 
			this.btnSave.AccessibleDescription = resources.GetString("btnSave.AccessibleDescription");
			this.btnSave.AccessibleName = resources.GetString("btnSave.AccessibleName");
			this.btnSave.Anchor = ((System.Windows.Forms.AnchorStyles)(resources.GetObject("btnSave.Anchor")));
			this.btnSave.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("btnSave.BackgroundImage")));
			this.btnSave.Dock = ((System.Windows.Forms.DockStyle)(resources.GetObject("btnSave.Dock")));
			this.btnSave.Enabled = ((bool)(resources.GetObject("btnSave.Enabled")));
			this.btnSave.FlatStyle = ((System.Windows.Forms.FlatStyle)(resources.GetObject("btnSave.FlatStyle")));
			this.btnSave.Font = ((System.Drawing.Font)(resources.GetObject("btnSave.Font")));
			this.btnSave.Image = ((System.Drawing.Image)(resources.GetObject("btnSave.Image")));
			this.btnSave.ImageAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("btnSave.ImageAlign")));
			this.btnSave.ImageIndex = ((int)(resources.GetObject("btnSave.ImageIndex")));
			this.btnSave.ImeMode = ((System.Windows.Forms.ImeMode)(resources.GetObject("btnSave.ImeMode")));
			this.btnSave.Location = ((System.Drawing.Point)(resources.GetObject("btnSave.Location")));
			this.btnSave.Name = "btnSave";
			this.btnSave.RightToLeft = ((System.Windows.Forms.RightToLeft)(resources.GetObject("btnSave.RightToLeft")));
			this.btnSave.Size = ((System.Drawing.Size)(resources.GetObject("btnSave.Size")));
			this.btnSave.TabIndex = ((int)(resources.GetObject("btnSave.TabIndex")));
			this.btnSave.Text = resources.GetString("btnSave.Text");
			this.btnSave.TextAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("btnSave.TextAlign")));
			this.btnSave.Visible = ((bool)(resources.GetObject("btnSave.Visible")));
			this.btnSave.Click += new System.EventHandler(this.btnSave_Click);
			// 
			// btnAdd
			// 
			this.btnAdd.AccessibleDescription = resources.GetString("btnAdd.AccessibleDescription");
			this.btnAdd.AccessibleName = resources.GetString("btnAdd.AccessibleName");
			this.btnAdd.Anchor = ((System.Windows.Forms.AnchorStyles)(resources.GetObject("btnAdd.Anchor")));
			this.btnAdd.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("btnAdd.BackgroundImage")));
			this.btnAdd.Dock = ((System.Windows.Forms.DockStyle)(resources.GetObject("btnAdd.Dock")));
			this.btnAdd.Enabled = ((bool)(resources.GetObject("btnAdd.Enabled")));
			this.btnAdd.FlatStyle = ((System.Windows.Forms.FlatStyle)(resources.GetObject("btnAdd.FlatStyle")));
			this.btnAdd.Font = ((System.Drawing.Font)(resources.GetObject("btnAdd.Font")));
			this.btnAdd.Image = ((System.Drawing.Image)(resources.GetObject("btnAdd.Image")));
			this.btnAdd.ImageAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("btnAdd.ImageAlign")));
			this.btnAdd.ImageIndex = ((int)(resources.GetObject("btnAdd.ImageIndex")));
			this.btnAdd.ImeMode = ((System.Windows.Forms.ImeMode)(resources.GetObject("btnAdd.ImeMode")));
			this.btnAdd.Location = ((System.Drawing.Point)(resources.GetObject("btnAdd.Location")));
			this.btnAdd.Name = "btnAdd";
			this.btnAdd.RightToLeft = ((System.Windows.Forms.RightToLeft)(resources.GetObject("btnAdd.RightToLeft")));
			this.btnAdd.Size = ((System.Drawing.Size)(resources.GetObject("btnAdd.Size")));
			this.btnAdd.TabIndex = ((int)(resources.GetObject("btnAdd.TabIndex")));
			this.btnAdd.Text = resources.GetString("btnAdd.Text");
			this.btnAdd.TextAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("btnAdd.TextAlign")));
			this.btnAdd.Visible = ((bool)(resources.GetObject("btnAdd.Visible")));
			this.btnAdd.Click += new System.EventHandler(this.btnAdd_Click);
			// 
			// btnPrint
			// 
			this.btnPrint.AccessibleDescription = resources.GetString("btnPrint.AccessibleDescription");
			this.btnPrint.AccessibleName = resources.GetString("btnPrint.AccessibleName");
			this.btnPrint.Anchor = ((System.Windows.Forms.AnchorStyles)(resources.GetObject("btnPrint.Anchor")));
			this.btnPrint.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("btnPrint.BackgroundImage")));
			this.btnPrint.Dock = ((System.Windows.Forms.DockStyle)(resources.GetObject("btnPrint.Dock")));
			this.btnPrint.Enabled = ((bool)(resources.GetObject("btnPrint.Enabled")));
			this.btnPrint.FlatStyle = ((System.Windows.Forms.FlatStyle)(resources.GetObject("btnPrint.FlatStyle")));
			this.btnPrint.Font = ((System.Drawing.Font)(resources.GetObject("btnPrint.Font")));
			this.btnPrint.Image = ((System.Drawing.Image)(resources.GetObject("btnPrint.Image")));
			this.btnPrint.ImageAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("btnPrint.ImageAlign")));
			this.btnPrint.ImageIndex = ((int)(resources.GetObject("btnPrint.ImageIndex")));
			this.btnPrint.ImeMode = ((System.Windows.Forms.ImeMode)(resources.GetObject("btnPrint.ImeMode")));
			this.btnPrint.Location = ((System.Drawing.Point)(resources.GetObject("btnPrint.Location")));
			this.btnPrint.Name = "btnPrint";
			this.btnPrint.RightToLeft = ((System.Windows.Forms.RightToLeft)(resources.GetObject("btnPrint.RightToLeft")));
			this.btnPrint.Size = ((System.Drawing.Size)(resources.GetObject("btnPrint.Size")));
			this.btnPrint.TabIndex = ((int)(resources.GetObject("btnPrint.TabIndex")));
			this.btnPrint.Text = resources.GetString("btnPrint.Text");
			this.btnPrint.TextAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("btnPrint.TextAlign")));
			this.btnPrint.Visible = ((bool)(resources.GetObject("btnPrint.Visible")));
			this.btnPrint.Click += new System.EventHandler(this.btnPrint_Click);
			// 
			// dgrdData
			// 
			this.dgrdData.AccessibleDescription = resources.GetString("dgrdData.AccessibleDescription");
			this.dgrdData.AccessibleName = resources.GetString("dgrdData.AccessibleName");
			this.dgrdData.AllowAddNew = ((bool)(resources.GetObject("dgrdData.AllowAddNew")));
			this.dgrdData.AllowArrows = ((bool)(resources.GetObject("dgrdData.AllowArrows")));
			this.dgrdData.AllowColMove = ((bool)(resources.GetObject("dgrdData.AllowColMove")));
			this.dgrdData.AllowColSelect = ((bool)(resources.GetObject("dgrdData.AllowColSelect")));
			this.dgrdData.AllowDelete = ((bool)(resources.GetObject("dgrdData.AllowDelete")));
			this.dgrdData.AllowDrag = ((bool)(resources.GetObject("dgrdData.AllowDrag")));
			this.dgrdData.AllowFilter = ((bool)(resources.GetObject("dgrdData.AllowFilter")));
			this.dgrdData.AllowHorizontalSplit = ((bool)(resources.GetObject("dgrdData.AllowHorizontalSplit")));
			this.dgrdData.AllowRowSelect = ((bool)(resources.GetObject("dgrdData.AllowRowSelect")));
			this.dgrdData.AllowSort = ((bool)(resources.GetObject("dgrdData.AllowSort")));
			this.dgrdData.AllowUpdate = ((bool)(resources.GetObject("dgrdData.AllowUpdate")));
			this.dgrdData.AllowUpdateOnBlur = ((bool)(resources.GetObject("dgrdData.AllowUpdateOnBlur")));
			this.dgrdData.AllowVerticalSplit = ((bool)(resources.GetObject("dgrdData.AllowVerticalSplit")));
			this.dgrdData.AlternatingRows = ((bool)(resources.GetObject("dgrdData.AlternatingRows")));
			this.dgrdData.Anchor = ((System.Windows.Forms.AnchorStyles)(resources.GetObject("dgrdData.Anchor")));
			this.dgrdData.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("dgrdData.BackgroundImage")));
			this.dgrdData.BorderStyle = ((System.Windows.Forms.BorderStyle)(resources.GetObject("dgrdData.BorderStyle")));
			this.dgrdData.Caption = resources.GetString("dgrdData.Caption");
			this.dgrdData.CaptionHeight = ((int)(resources.GetObject("dgrdData.CaptionHeight")));
			this.dgrdData.CellTipsDelay = ((int)(resources.GetObject("dgrdData.CellTipsDelay")));
			this.dgrdData.CellTipsWidth = ((int)(resources.GetObject("dgrdData.CellTipsWidth")));
			this.dgrdData.ChildGrid = ((C1.Win.C1TrueDBGrid.C1TrueDBGrid)(resources.GetObject("dgrdData.ChildGrid")));
			this.dgrdData.CollapseColor = ((System.Drawing.Color)(resources.GetObject("dgrdData.CollapseColor")));
			this.dgrdData.ColumnFooters = ((bool)(resources.GetObject("dgrdData.ColumnFooters")));
			this.dgrdData.ColumnHeaders = ((bool)(resources.GetObject("dgrdData.ColumnHeaders")));
			this.dgrdData.DefColWidth = ((int)(resources.GetObject("dgrdData.DefColWidth")));
			this.dgrdData.Dock = ((System.Windows.Forms.DockStyle)(resources.GetObject("dgrdData.Dock")));
			this.dgrdData.EditDropDown = ((bool)(resources.GetObject("dgrdData.EditDropDown")));
			this.dgrdData.EmptyRows = ((bool)(resources.GetObject("dgrdData.EmptyRows")));
			this.dgrdData.Enabled = ((bool)(resources.GetObject("dgrdData.Enabled")));
			this.dgrdData.ExpandColor = ((System.Drawing.Color)(resources.GetObject("dgrdData.ExpandColor")));
			this.dgrdData.ExposeCellMode = ((C1.Win.C1TrueDBGrid.ExposeCellModeEnum)(resources.GetObject("dgrdData.ExposeCellMode")));
			this.dgrdData.ExtendRightColumn = ((bool)(resources.GetObject("dgrdData.ExtendRightColumn")));
			this.dgrdData.FetchRowStyles = ((bool)(resources.GetObject("dgrdData.FetchRowStyles")));
			this.dgrdData.FilterBar = ((bool)(resources.GetObject("dgrdData.FilterBar")));
			this.dgrdData.FlatStyle = ((C1.Win.C1TrueDBGrid.FlatModeEnum)(resources.GetObject("dgrdData.FlatStyle")));
			this.dgrdData.Font = ((System.Drawing.Font)(resources.GetObject("dgrdData.Font")));
			this.dgrdData.GroupByAreaVisible = ((bool)(resources.GetObject("dgrdData.GroupByAreaVisible")));
			this.dgrdData.GroupByCaption = resources.GetString("dgrdData.GroupByCaption");
			this.dgrdData.Images.Add(((System.Drawing.Image)(resources.GetObject("resource"))));
			this.dgrdData.ImeMode = ((System.Windows.Forms.ImeMode)(resources.GetObject("dgrdData.ImeMode")));
			this.dgrdData.LinesPerRow = ((int)(resources.GetObject("dgrdData.LinesPerRow")));
			this.dgrdData.Location = ((System.Drawing.Point)(resources.GetObject("dgrdData.Location")));
			this.dgrdData.MarqueeStyle = C1.Win.C1TrueDBGrid.MarqueeEnum.DottedCellBorder;
			this.dgrdData.Name = "dgrdData";
			this.dgrdData.PictureAddnewRow = ((System.Drawing.Image)(resources.GetObject("dgrdData.PictureAddnewRow")));
			this.dgrdData.PictureCurrentRow = ((System.Drawing.Image)(resources.GetObject("dgrdData.PictureCurrentRow")));
			this.dgrdData.PictureFilterBar = ((System.Drawing.Image)(resources.GetObject("dgrdData.PictureFilterBar")));
			this.dgrdData.PictureFooterRow = ((System.Drawing.Image)(resources.GetObject("dgrdData.PictureFooterRow")));
			this.dgrdData.PictureHeaderRow = ((System.Drawing.Image)(resources.GetObject("dgrdData.PictureHeaderRow")));
			this.dgrdData.PictureModifiedRow = ((System.Drawing.Image)(resources.GetObject("dgrdData.PictureModifiedRow")));
			this.dgrdData.PictureStandardRow = ((System.Drawing.Image)(resources.GetObject("dgrdData.PictureStandardRow")));
			this.dgrdData.PreviewInfo.AllowSizing = ((bool)(resources.GetObject("dgrdData.PreviewInfo.AllowSizing")));
			this.dgrdData.PreviewInfo.Caption = resources.GetString("dgrdData.PreviewInfo.Caption");
			this.dgrdData.PreviewInfo.Location = ((System.Drawing.Point)(resources.GetObject("dgrdData.PreviewInfo.Location")));
			this.dgrdData.PreviewInfo.Size = ((System.Drawing.Size)(resources.GetObject("dgrdData.PreviewInfo.Size")));
			this.dgrdData.PreviewInfo.ToolBars = ((bool)(resources.GetObject("dgrdData.PreviewInfo.ToolBars")));
			this.dgrdData.PreviewInfo.UIStrings.Content = ((string[])(resources.GetObject("dgrdData.PreviewInfo.UIStrings.Content")));
			this.dgrdData.PreviewInfo.ZoomFactor = ((System.Double)(resources.GetObject("dgrdData.PreviewInfo.ZoomFactor")));
			this.dgrdData.PrintInfo.MaxRowHeight = ((int)(resources.GetObject("dgrdData.PrintInfo.MaxRowHeight")));
			this.dgrdData.PrintInfo.OwnerDrawPageFooter = ((bool)(resources.GetObject("dgrdData.PrintInfo.OwnerDrawPageFooter")));
			this.dgrdData.PrintInfo.OwnerDrawPageHeader = ((bool)(resources.GetObject("dgrdData.PrintInfo.OwnerDrawPageHeader")));
			this.dgrdData.PrintInfo.PageFooter = resources.GetString("dgrdData.PrintInfo.PageFooter");
			this.dgrdData.PrintInfo.PageFooterHeight = ((int)(resources.GetObject("dgrdData.PrintInfo.PageFooterHeight")));
			this.dgrdData.PrintInfo.PageHeader = resources.GetString("dgrdData.PrintInfo.PageHeader");
			this.dgrdData.PrintInfo.PageHeaderHeight = ((int)(resources.GetObject("dgrdData.PrintInfo.PageHeaderHeight")));
			this.dgrdData.PrintInfo.PrintHorizontalSplits = ((bool)(resources.GetObject("dgrdData.PrintInfo.PrintHorizontalSplits")));
			this.dgrdData.PrintInfo.ProgressCaption = resources.GetString("dgrdData.PrintInfo.ProgressCaption");
			this.dgrdData.PrintInfo.RepeatColumnFooters = ((bool)(resources.GetObject("dgrdData.PrintInfo.RepeatColumnFooters")));
			this.dgrdData.PrintInfo.RepeatColumnHeaders = ((bool)(resources.GetObject("dgrdData.PrintInfo.RepeatColumnHeaders")));
			this.dgrdData.PrintInfo.RepeatGridHeader = ((bool)(resources.GetObject("dgrdData.PrintInfo.RepeatGridHeader")));
			this.dgrdData.PrintInfo.RepeatSplitHeaders = ((bool)(resources.GetObject("dgrdData.PrintInfo.RepeatSplitHeaders")));
			this.dgrdData.PrintInfo.ShowOptionsDialog = ((bool)(resources.GetObject("dgrdData.PrintInfo.ShowOptionsDialog")));
			this.dgrdData.PrintInfo.ShowProgressForm = ((bool)(resources.GetObject("dgrdData.PrintInfo.ShowProgressForm")));
			this.dgrdData.PrintInfo.ShowSelection = ((bool)(resources.GetObject("dgrdData.PrintInfo.ShowSelection")));
			this.dgrdData.PrintInfo.UseGridColors = ((bool)(resources.GetObject("dgrdData.PrintInfo.UseGridColors")));
			this.dgrdData.RecordSelectors = ((bool)(resources.GetObject("dgrdData.RecordSelectors")));
			this.dgrdData.RecordSelectorWidth = ((int)(resources.GetObject("dgrdData.RecordSelectorWidth")));
			this.dgrdData.RightToLeft = ((System.Windows.Forms.RightToLeft)(resources.GetObject("dgrdData.RightToLeft")));
			this.dgrdData.RowDivider.Color = ((System.Drawing.Color)(resources.GetObject("resource.Color")));
			this.dgrdData.RowDivider.Style = ((C1.Win.C1TrueDBGrid.LineStyleEnum)(resources.GetObject("resource.Style")));
			this.dgrdData.RowHeight = ((int)(resources.GetObject("dgrdData.RowHeight")));
			this.dgrdData.RowSubDividerColor = ((System.Drawing.Color)(resources.GetObject("dgrdData.RowSubDividerColor")));
			this.dgrdData.ScrollTips = ((bool)(resources.GetObject("dgrdData.ScrollTips")));
			this.dgrdData.ScrollTrack = ((bool)(resources.GetObject("dgrdData.ScrollTrack")));
			this.dgrdData.Size = ((System.Drawing.Size)(resources.GetObject("dgrdData.Size")));
			this.dgrdData.SpringMode = ((bool)(resources.GetObject("dgrdData.SpringMode")));
			this.dgrdData.TabAcrossSplits = ((bool)(resources.GetObject("dgrdData.TabAcrossSplits")));
			this.dgrdData.TabIndex = ((int)(resources.GetObject("dgrdData.TabIndex")));
			this.dgrdData.Text = resources.GetString("dgrdData.Text");
			this.dgrdData.ViewCaptionWidth = ((int)(resources.GetObject("dgrdData.ViewCaptionWidth")));
			this.dgrdData.ViewColumnWidth = ((int)(resources.GetObject("dgrdData.ViewColumnWidth")));
			this.dgrdData.Visible = ((bool)(resources.GetObject("dgrdData.Visible")));
			this.dgrdData.WrapCellPointer = ((bool)(resources.GetObject("dgrdData.WrapCellPointer")));
			this.dgrdData.AfterDelete += new System.EventHandler(this.dgrdData_AfterDelete);
			this.dgrdData.ButtonClick += new C1.Win.C1TrueDBGrid.ColEventHandler(this.dgrdData_ButtonClick);
			this.dgrdData.AfterColUpdate += new C1.Win.C1TrueDBGrid.ColEventHandler(this.dgrdData_AfterColUpdate);
			this.dgrdData.BeforeColUpdate += new C1.Win.C1TrueDBGrid.BeforeColUpdateEventHandler(this.dgrdData_BeforeColUpdate);
			this.dgrdData.BeforeDelete += new C1.Win.C1TrueDBGrid.CancelEventHandler(this.dgrdData_BeforeDelete);
			this.dgrdData.KeyDown += new System.Windows.Forms.KeyEventHandler(this.dgrdData_KeyDown);
			this.dgrdData.PropBag = resources.GetString("dgrdData.PropBag");
			// 
			// lblInvoice
			// 
			this.lblInvoice.AccessibleDescription = resources.GetString("lblInvoice.AccessibleDescription");
			this.lblInvoice.AccessibleName = resources.GetString("lblInvoice.AccessibleName");
			this.lblInvoice.Anchor = ((System.Windows.Forms.AnchorStyles)(resources.GetObject("lblInvoice.Anchor")));
			this.lblInvoice.AutoSize = ((bool)(resources.GetObject("lblInvoice.AutoSize")));
			this.lblInvoice.Dock = ((System.Windows.Forms.DockStyle)(resources.GetObject("lblInvoice.Dock")));
			this.lblInvoice.Enabled = ((bool)(resources.GetObject("lblInvoice.Enabled")));
			this.lblInvoice.Font = ((System.Drawing.Font)(resources.GetObject("lblInvoice.Font")));
			this.lblInvoice.Image = ((System.Drawing.Image)(resources.GetObject("lblInvoice.Image")));
			this.lblInvoice.ImageAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("lblInvoice.ImageAlign")));
			this.lblInvoice.ImageIndex = ((int)(resources.GetObject("lblInvoice.ImageIndex")));
			this.lblInvoice.ImeMode = ((System.Windows.Forms.ImeMode)(resources.GetObject("lblInvoice.ImeMode")));
			this.lblInvoice.Location = ((System.Drawing.Point)(resources.GetObject("lblInvoice.Location")));
			this.lblInvoice.Name = "lblInvoice";
			this.lblInvoice.RightToLeft = ((System.Windows.Forms.RightToLeft)(resources.GetObject("lblInvoice.RightToLeft")));
			this.lblInvoice.Size = ((System.Drawing.Size)(resources.GetObject("lblInvoice.Size")));
			this.lblInvoice.TabIndex = ((int)(resources.GetObject("lblInvoice.TabIndex")));
			this.lblInvoice.Text = resources.GetString("lblInvoice.Text");
			this.lblInvoice.TextAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("lblInvoice.TextAlign")));
			this.lblInvoice.Visible = ((bool)(resources.GetObject("lblInvoice.Visible")));
			// 
			// lblPurchaseOrder
			// 
			this.lblPurchaseOrder.AccessibleDescription = resources.GetString("lblPurchaseOrder.AccessibleDescription");
			this.lblPurchaseOrder.AccessibleName = resources.GetString("lblPurchaseOrder.AccessibleName");
			this.lblPurchaseOrder.Anchor = ((System.Windows.Forms.AnchorStyles)(resources.GetObject("lblPurchaseOrder.Anchor")));
			this.lblPurchaseOrder.AutoSize = ((bool)(resources.GetObject("lblPurchaseOrder.AutoSize")));
			this.lblPurchaseOrder.Dock = ((System.Windows.Forms.DockStyle)(resources.GetObject("lblPurchaseOrder.Dock")));
			this.lblPurchaseOrder.Enabled = ((bool)(resources.GetObject("lblPurchaseOrder.Enabled")));
			this.lblPurchaseOrder.Font = ((System.Drawing.Font)(resources.GetObject("lblPurchaseOrder.Font")));
			this.lblPurchaseOrder.Image = ((System.Drawing.Image)(resources.GetObject("lblPurchaseOrder.Image")));
			this.lblPurchaseOrder.ImageAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("lblPurchaseOrder.ImageAlign")));
			this.lblPurchaseOrder.ImageIndex = ((int)(resources.GetObject("lblPurchaseOrder.ImageIndex")));
			this.lblPurchaseOrder.ImeMode = ((System.Windows.Forms.ImeMode)(resources.GetObject("lblPurchaseOrder.ImeMode")));
			this.lblPurchaseOrder.Location = ((System.Drawing.Point)(resources.GetObject("lblPurchaseOrder.Location")));
			this.lblPurchaseOrder.Name = "lblPurchaseOrder";
			this.lblPurchaseOrder.RightToLeft = ((System.Windows.Forms.RightToLeft)(resources.GetObject("lblPurchaseOrder.RightToLeft")));
			this.lblPurchaseOrder.Size = ((System.Drawing.Size)(resources.GetObject("lblPurchaseOrder.Size")));
			this.lblPurchaseOrder.TabIndex = ((int)(resources.GetObject("lblPurchaseOrder.TabIndex")));
			this.lblPurchaseOrder.Text = resources.GetString("lblPurchaseOrder.Text");
			this.lblPurchaseOrder.TextAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("lblPurchaseOrder.TextAlign")));
			this.lblPurchaseOrder.Visible = ((bool)(resources.GetObject("lblPurchaseOrder.Visible")));
			this.lblPurchaseOrder.Click += new System.EventHandler(this.lblPurchaseOrder_Click);
			// 
			// POReturnToVendor
			// 
			this.AccessibleDescription = resources.GetString("$this.AccessibleDescription");
			this.AccessibleName = resources.GetString("$this.AccessibleName");
			this.AutoScaleBaseSize = ((System.Drawing.Size)(resources.GetObject("$this.AutoScaleBaseSize")));
			this.AutoScroll = ((bool)(resources.GetObject("$this.AutoScroll")));
			this.AutoScrollMargin = ((System.Drawing.Size)(resources.GetObject("$this.AutoScrollMargin")));
			this.AutoScrollMinSize = ((System.Drawing.Size)(resources.GetObject("$this.AutoScrollMinSize")));
			this.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("$this.BackgroundImage")));
			this.CancelButton = this.btnClose;
			this.ClientSize = ((System.Drawing.Size)(resources.GetObject("$this.ClientSize")));
			this.Controls.Add(this.lblPurchaseOrder);
			this.Controls.Add(this.lblInvoice);
			this.Controls.Add(this.dgrdData);
			this.Controls.Add(this.txtReturnNo);
			this.Controls.Add(this.txtMasLoc);
			this.Controls.Add(this.txtRefNo);
			this.Controls.Add(this.txtProductionLine);
			this.Controls.Add(this.txtVendorCode);
			this.Controls.Add(this.txtVendorName);
			this.Controls.Add(this.txtVendorLoc);
			this.Controls.Add(this.btnClose);
			this.Controls.Add(this.btnHelp);
			this.Controls.Add(this.btnDelete);
			this.Controls.Add(this.btnSave);
			this.Controls.Add(this.btnAdd);
			this.Controls.Add(this.btnPrint);
			this.Controls.Add(this.cboCCN);
			this.Controls.Add(this.lblCCN);
			this.Controls.Add(this.btnReturnNo);
			this.Controls.Add(this.cboReturnBy);
			this.Controls.Add(this.lblReturnNo);
			this.Controls.Add(this.dtmPostDate);
			this.Controls.Add(this.lblPostDate);
			this.Controls.Add(this.lblMasLoc);
			this.Controls.Add(this.lblRefNo);
			this.Controls.Add(this.lblVendor);
			this.Controls.Add(this.lblProductionLine);
			this.Controls.Add(this.lblVendorLocation);
			this.Controls.Add(this.lblReturnBy);
			this.Controls.Add(this.btnMasLoc);
			this.Controls.Add(this.btnRefNo);
			this.Controls.Add(this.btnProductionLine);
			this.Controls.Add(this.btnVendorCode);
			this.Controls.Add(this.btnVendorLoc);
			this.Enabled = ((bool)(resources.GetObject("$this.Enabled")));
			this.Font = ((System.Drawing.Font)(resources.GetObject("$this.Font")));
			this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
			this.ImeMode = ((System.Windows.Forms.ImeMode)(resources.GetObject("$this.ImeMode")));
			this.Location = ((System.Drawing.Point)(resources.GetObject("$this.Location")));
			this.MaximumSize = ((System.Drawing.Size)(resources.GetObject("$this.MaximumSize")));
			this.MinimumSize = ((System.Drawing.Size)(resources.GetObject("$this.MinimumSize")));
			this.Name = "POReturnToVendor";
			this.RightToLeft = ((System.Windows.Forms.RightToLeft)(resources.GetObject("$this.RightToLeft")));
			this.StartPosition = ((System.Windows.Forms.FormStartPosition)(resources.GetObject("$this.StartPosition")));
			this.Text = resources.GetString("$this.Text");
			this.Closing += new System.ComponentModel.CancelEventHandler(this.POReturnToVendor_Closing);
			this.Load += new System.EventHandler(this.POReturnToVendor_Load);
			((System.ComponentModel.ISupportInitialize)(this.dtmPostDate)).EndInit();
			((System.ComponentModel.ISupportInitialize)(this.cboCCN)).EndInit();
			((System.ComponentModel.ISupportInitialize)(this.dgrdData)).EndInit();
			this.ResumeLayout(false);

		}
		#endregion

		#region private methods
		private void SwitchFormMode()
		{
			switch (enumAction)
			{
				case EnumAction.Add:
					#region disable
					btnAdd.Enabled = false;
					btnDelete.Enabled = false;
					btnReturnNo.Enabled = false;
					#endregion

					#region enable
					dtmPostDate.Enabled = true;
					txtMasLoc.Enabled = true;
					btnMasLoc.Enabled = true;
					cboReturnBy.Enabled = true;
					txtRefNo.Enabled = true;
					btnRefNo.Enabled = true;
					txtProductionLine.Enabled = true;
					btnProductionLine.Enabled = true;
					txtVendorCode.Enabled = true;
					btnVendorCode.Enabled = true;
					txtVendorLoc.Enabled = true;
					btnVendorLoc.Enabled = true;
					btnSave.Enabled = true;
					// grid
					dgrdData.Splits[0].Locked = false;
					//dgrdData.AllowAddNew = true;
					#endregion
					break;
				default:
					#region enable
					btnAdd.Enabled = true;
					if (txtReturnNo.Tag != null && (int)txtReturnNo.Tag > 0)
					{
						btnDelete.Enabled = true;
						btnPrint.Enabled = true;
					}
					else
					{
						btnDelete.Enabled = false;
						btnPrint.Enabled = false;
					}
					btnReturnNo.Enabled = true;
					#endregion

					#region disable
					dtmPostDate.Enabled = false;
					txtMasLoc.Enabled = false;
					btnMasLoc.Enabled = false;
					cboReturnBy.Enabled = false;
					txtRefNo.Enabled = false;
					btnRefNo.Enabled = false;
					txtProductionLine.Enabled = false;
					btnProductionLine.Enabled = false;
					txtVendorCode.Enabled = false;
					btnVendorCode.Enabled = false;
					txtVendorLoc.Enabled = false;
					btnVendorLoc.Enabled = false;
					btnSave.Enabled = false;
					// grid
					dgrdData.Splits[0].Locked = true;
					foreach (C1DisplayColumn c1Col in dgrdData.Splits[0].DisplayColumns)
						c1Col.Button = false;
					//dgrdData.AllowAddNew = false;
					#endregion
					break;
			}
		}
		private void LoadReturnData(int pintReturnMasterID)
		{
			// master data
			DataRow drowInfo;
			voReturnMaster = (PO_ReturnToVendorMasterVO)boReturn.GetMasterInfo(pintReturnMasterID, out drowInfo);
			if (pintReturnMasterID > 0)
			{
				// display data to form
				dtmPostDate.Value = voReturnMaster.PostDate;
				txtReturnNo.Text = voReturnMaster.RTVNo;
				txtReturnNo.Tag = voReturnMaster.ReturnToVendorMasterID;
				txtMasLoc.Text = drowInfo[MASTERLOCCODE_FLD].ToString();
				txtMasLoc.Tag = voReturnMaster.MasterLocationID;
				txtVendorCode.Text = drowInfo[PARTYCODE_FLD].ToString().Trim();
				txtVendorCode.Tag = voReturnMaster.PartyID;
				txtVendorName.Text = drowInfo[PARTYNAME_FLD].ToString().Trim();
				txtVendorLoc.Text = drowInfo[PURCHASELOCCODE_FLD].ToString().Trim();
				txtProductionLine.Text = drowInfo[PRODUCTIONLINECODE_FLD].ToString().Trim();
				txtProductionLine.Tag = voReturnMaster.ProductionLineId;
				if (Convert.ToBoolean(drowInfo[PO_ReturnToVendorMasterTable.BYPO_FLD]))
				{
					cboReturnBy.SelectedIndex = 0;
					txtRefNo.Text = drowInfo[PURCHASEORDERCODE_FLD].ToString();
					txtRefNo.Tag = voReturnMaster.PurchaseOrderMasterID;
				}
				else
				{
					cboReturnBy.SelectedIndex = 1;
					txtRefNo.Text = drowInfo[PO_InvoiceMasterTable.INVOICENO_FLD].ToString();
					txtRefNo.Tag = voReturnMaster.InvoiceMasterID;
				}
			}
			// detail data
			dstData = boReturn.GetDetailData(pintReturnMasterID);
			BindDataToGrid();
			SwitchFormMode();
		}
		private void BindDataToGrid()
		{
			dgrdData.DataSource = dstData.Tables[0];
			// restore grid layout
			FormControlComponents.RestoreGridLayout(dgrdData, dtbGridLayOut);
			foreach (C1DisplayColumn c1Col in dgrdData.Splits[0].DisplayColumns)
				c1Col.Locked = true;

			dgrdData.Splits[0].DisplayColumns[MST_LocationTable.TABLE_NAME + MST_LocationTable.CODE_FLD].Locked = false;
			dgrdData.Splits[0].DisplayColumns[MST_LocationTable.TABLE_NAME + MST_LocationTable.CODE_FLD].Button = true;
			dgrdData.Splits[0].DisplayColumns[MST_BINTable.TABLE_NAME + MST_BINTable.CODE_FLD].Locked = false;
			dgrdData.Splits[0].DisplayColumns[MST_BINTable.TABLE_NAME + MST_BINTable.CODE_FLD].Button = true;
			dgrdData.Splits[0].DisplayColumns[PO_ReturnToVendorDetailTable.QUANTITY_FLD].Locked = false;
			dgrdData.Splits[0].DisplayColumns[PO_ReturnToVendorDetailTable.UNITPRICE_FLD].Locked = false;
			dgrdData.Splits[0].DisplayColumns[PO_ReturnToVendorDetailTable.VATPERCENT_FLD].Locked = false;

			// number format in grid
			dgrdData.Columns[PO_ReturnToVendorDetailTable.QUANTITY_FLD].NumberFormat = Constants.DECIMAL_NUMBERFORMAT;
			dgrdData.Columns[PO_ReturnToVendorDetailTable.VATAMOUNT_FLD].NumberFormat = Constants.DECIMAL_LONG_FORMAT;
			dgrdData.Columns[PO_ReturnToVendorDetailTable.VATPERCENT_FLD].NumberFormat = Constants.DECIMAL_LONG_FORMAT;
			dgrdData.Columns[PO_ReturnToVendorDetailTable.TOTALAMOUNT_FLD].NumberFormat = Constants.DECIMAL_LONG_FORMAT;
			dgrdData.Columns[PO_ReturnToVendorDetailTable.AMOUNT_FLD].NumberFormat = Constants.DECIMAL_LONG_FORMAT;
			dgrdData.Columns[PO_ReturnToVendorDetailTable.UNITPRICE_FLD].NumberFormat = Constants.DECIMAL_LONG_FORMAT;
		}
		private void ResetForm()
		{
			txtReturnNo.Text = string.Empty;
			txtReturnNo.Tag = null;
			txtMasLoc.Text = string.Empty;
			txtMasLoc.Tag = null;
			cboReturnBy.SelectedIndex = -1;
			txtRefNo.Text = string.Empty;
			txtRefNo.Tag = null;
			txtProductionLine.Text = string.Empty;
			txtProductionLine.Tag = null;
			txtVendorCode.Text = string.Empty;
			txtVendorCode.Tag = null;
			txtVendorName.Text = string.Empty;
			txtVendorLoc.Text = string.Empty;

			if (dstData != null && dstData.Tables.Count > 0)
				dstData.Tables[0].Clear();
		}
		private void ChangeMasLoc()
		{
			if (dstData != null && dstData.Tables.Count > 0)
			{
				foreach (DataRow drowData in dstData.Tables[0].Rows)
				{
					if (drowData.RowState != DataRowState.Deleted)
					{
						drowData[MST_LocationTable.TABLE_NAME + MST_LocationTable.CODE_FLD] = string.Empty;
						drowData[MST_LocationTable.LOCATIONID_FLD] = null;
						drowData[MST_BINTable.TABLE_NAME + MST_BINTable.CODE_FLD] = string.Empty;
						drowData[MST_BINTable.BINID_FLD] = null;
					}
				}
			}
		}
		private void ReturnByPO(DataRow pdrowData)
		{
			txtRefNo.Text = pdrowData[PO_PurchaseOrderMasterTable.CODE_FLD].ToString();
			txtRefNo.Tag = pdrowData[PO_PurchaseOrderMasterTable.PURCHASEORDERMASTERID_FLD].ToString();

			dtmOrderDate = (DateTime) pdrowData[PO_PurchaseOrderMasterTable.ORDERDATE_FLD];

			int intVendorLocID = 0;
			try
			{
				intVendorLocID = Convert.ToInt32(pdrowData[PO_PurchaseOrderMasterTable.VENDORLOCID_FLD]);
			}
			catch{}
			DataRow drowVendorInfo = boReturn.GetVendorInfo(Convert.ToInt32(pdrowData[PO_PurchaseOrderMasterTable.PARTYID_FLD]), intVendorLocID);
			txtVendorCode.Text = drowVendorInfo[MST_PartyTable.TABLE_NAME + MST_PartyTable.CODE_FLD].ToString();
			txtVendorCode.Tag = Convert.ToInt32(pdrowData[PO_PurchaseOrderMasterTable.PARTYID_FLD]);
			txtVendorName.Text = drowVendorInfo[MST_PartyTable.NAME_FLD].ToString();
			if (intVendorLocID > 0)
			{
				txtVendorLoc.Text = drowVendorInfo[MST_PartyLocationTable.TABLE_NAME + MST_PartyLocationTable.CODE_FLD].ToString();
				txtVendorLoc.Tag = Convert.ToInt32(pdrowData[PO_PurchaseOrderMasterTable.VENDORLOCID_FLD]);
			}
			dtbReceived = boReturn.GetListOfReceivedProductsFromPurchaseOrder(Convert.ToInt32(txtRefNo.Tag));
			InputPurchaseOrderDetailIntoGrid(dtbReceived);
			BindDataToGrid();
		}
		private void InputPurchaseOrderDetailIntoGrid(DataTable dtData)
		{
			if (dstData != null && dstData.Tables.Count > 0)
				dstData.Tables[0].Clear();
			else
				dstData = boReturn.GetDetailData(0);

			int intLine = 1;
			foreach (DataRow drowTmp in dtData.Rows)
			{
				DataRow drowNewRow = dstData.Tables[0].NewRow();
				drowNewRow[PO_ReturnToVendorDetailTable.LINE_FLD] = intLine;
				// purchase order detail id as ref detail
				drowNewRow[PO_ReturnToVendorDetailTable.REFDETAILID_FLD] = drowTmp[PO_PurchaseOrderDetailTable.PURCHASEORDERDETAILID_FLD];
				// ProductID
				drowNewRow[SO_ReturnedGoodsDetailTable.PRODUCTID_FLD] = drowTmp[PO_PurchaseOrderDetailTable.PRODUCTID_FLD];
				//LocationID
				drowNewRow[PO_ReturnToVendorDetailTable.LOCATIONID_FLD] = drowTmp[ITM_ProductTable.LOCATIONID_FLD];
				//Location Code
				drowNewRow[MST_LocationTable.TABLE_NAME + MST_LocationTable.CODE_FLD] = drowTmp["LocationCode"];
				//BinID
				drowNewRow[PO_ReturnToVendorDetailTable.BINID_FLD] = drowTmp[ITM_ProductTable.BINID_FLD];
				//Bin Code
				drowNewRow[MST_BINTable.TABLE_NAME + MST_BINTable.CODE_FLD] = drowTmp["BinCode"];
				//Product code
				drowNewRow[ITM_ProductTable.TABLE_NAME + ITM_ProductTable.CODE_FLD] = drowTmp[ITM_ProductTable.CODE_FLD];
				//product description
				drowNewRow[ITM_ProductTable.DESCRIPTION_FLD] = drowTmp[ITM_ProductTable.DESCRIPTION_FLD];
				//revision
				drowNewRow[ITM_ProductTable.REVISION_FLD] = drowTmp[ITM_ProductTable.REVISION_FLD];
				//Stock unit
				drowNewRow[PO_ReturnToVendorDetailTable.STOCKUMID_FLD] = drowTmp[ITM_ProductTable.STOCKUMID_FLD];
				//Buying unit
				drowNewRow[PO_ReturnToVendorDetailTable.BUYINGUMID_FLD] = drowTmp[PO_PurchaseOrderDetailTable.BUYINGUMID_FLD];
				drowNewRow[MST_UnitOfMeasureTable.TABLE_NAME + MST_UnitOfMeasureTable.CODE_FLD] = drowTmp[MST_UnitOfMeasureTable.TABLE_NAME + MST_UnitOfMeasureTable.CODE_FLD];
				drowNewRow[PO_ReturnToVendorDetailTable.UMRATE_FLD] = drowTmp[PO_PurchaseOrderDetailTable.UMRATE_FLD];
				
				drowNewRow[PO_ReturnToVendorDetailTable.UNITPRICE_FLD] = drowTmp[PO_ReturnToVendorDetailTable.UNITPRICE_FLD];
				drowNewRow[PO_ReturnToVendorDetailTable.AMOUNT_FLD] = DBNull.Value;
				drowNewRow[PO_ReturnToVendorDetailTable.VATPERCENT_FLD] = drowTmp[PO_ReturnToVendorDetailTable.VATPERCENT_FLD];
				drowNewRow[PO_ReturnToVendorDetailTable.VATAMOUNT_FLD] = DBNull.Value;
				drowNewRow[PO_ReturnToVendorDetailTable.TOTALAMOUNT_FLD] = DBNull.Value;
				
				dstData.Tables[0].Rows.Add(drowNewRow);
				intLine = intLine + 1;
			}
		}

		private void ReturnByInvoice(DataRow pdrowData)
		{
			txtRefNo.Text = pdrowData[PO_InvoiceMasterTable.INVOICENO_FLD].ToString();
			txtRefNo.Tag = pdrowData[PO_InvoiceMasterTable.INVOICEMASTERID_FLD];

			txtVendorCode.Text = pdrowData["VendorCode"].ToString();
			txtVendorCode.Tag = Convert.ToInt32(pdrowData[MST_PartyTable.PARTYID_FLD]);
			txtVendorName.Text = pdrowData["VendorName"].ToString();
			txtVendorLoc.Text = pdrowData[MST_PartyLocationTable.TABLE_NAME + MST_PartyLocationTable.CODE_FLD].ToString();
			txtVendorLoc.Tag = Convert.ToInt32(pdrowData[MST_PartyLocationTable.PARTYLOCATIONID_FLD]);

			dstData = boReturn.GetDetailByInvoiceMasterID(Convert.ToInt32(txtRefNo.Tag));
			BindDataToGrid();
		}
		private void ShowPOSlipReport()
		{	
			#region Const
			const string APPLICATION_PATH  = @"PCSMain\bin\Debug";
								
			const string REPORT_LAYOUT = "ReturnToVendorSlip.xml";
			const string REPORT_COMPANY_FLD = "fldCompany";
			const string RPT_TITLE_FLD = "fldTitle";
			const string RPT_INVOICE_NO_FLD = "FldInvoiceNo";
			const string RPT_RETURN_NO_FLD = "FldREturnNo";
			const string RPT_POSTDATE_FLD = "FldPostDate";
			const string RPT_PO_NO_FLD = "FldPONo";
			const string RPT_VEDORCODE_FLD = "fldInvoiceNoValue";
			const string RPT_VEDORNAME_FLD = "FldVedorName";
			const string RPT_RETURN_NO2_FLD = "FldREturnNo2";

			#endregion

			this.Cursor = Cursors.WaitCursor;
			C1PrintPreviewDialog   printPreview = new C1PrintPreviewDialog();
			C1PrintPreviewDialogBO boReport = new C1PrintPreviewDialogBO();

			DataTable dtbResult = boReport.GetPOSlipDatavedor(voReturnMaster.ReturnToVendorMasterID);

			// Check data source
			if(dtbResult == null)
			{
				this.Cursor = Cursors.Default;
				return;
			}

			ReportBuilder reportBuilder = new ReportBuilder();
			
			//Get actual application path
			string strReportPath = Application.StartupPath;
			int intIndex = strReportPath.IndexOf(APPLICATION_PATH);
			if ( intIndex > -1 ) 
			{
				strReportPath = strReportPath.Substring(0, intIndex);
			}

			if(strReportPath.Substring(strReportPath.Length -1) == @"\")
			{
				strReportPath += Constants.REPORT_DEFINITION_STORE_LOCATION;
			}
			else
			{
				strReportPath += @"\" + Constants.REPORT_DEFINITION_STORE_LOCATION;
			}				
			
			//Set datasource and lay-out path for reports
			//				reportBuilder.SourceDataTable = dtbResult;
			reportBuilder.ReportDefinitionFolder = strReportPath;
			
			reportBuilder.ReportLayoutFile = REPORT_LAYOUT;

			//check if layout is valid
			if(reportBuilder.AnalyseLayoutFile())
			{					
				reportBuilder.UseLayoutFile = true;
			}
			else
			{
				this.Cursor = Cursors.Default;
				PCSMessageBox.Show(ErrorCode.MESSAGE_REPORT_TEMPLATE_FILE_NOT_FOUND, MessageBoxIcon.Error);
				return;
			}

			reportBuilder.SourceDataTable = dtbResult;
			reportBuilder.MakeDataTableForRender();

			// And show it in preview dialog				
			reportBuilder.ReportViewer = printPreview.ReportViewer;
			reportBuilder.RenderReport();				
			// get Return to vendor master
			DataRow drowInfo;
			boReturn.GetMasterInfo(voReturnMaster.ReturnToVendorMasterID, out drowInfo);

			//Header information get from system params
			reportBuilder.DrawPredefinedField(REPORT_COMPANY_FLD, SystemProperty.SytemParams.Get(SystemParam.COMPANY_FULL_NAME));
			reportBuilder.DrawPredefinedField(RPT_POSTDATE_FLD,voReturnMaster.PostDate.ToString(Constants.DATETIME_FORMAT_HOUR));
			reportBuilder.DrawPredefinedField(RPT_RETURN_NO_FLD,voReturnMaster.RTVNo);
			reportBuilder.DrawPredefinedField(RPT_VEDORCODE_FLD,drowInfo[PARTYCODE_FLD].ToString().Trim());
			reportBuilder.DrawPredefinedField(RPT_VEDORNAME_FLD,drowInfo[PARTYNAME_FLD].ToString().Trim());		
			reportBuilder.DrawPredefinedField(RPT_PO_NO_FLD,drowInfo[PURCHASEORDERCODE_FLD].ToString().Trim());
			reportBuilder.DrawPredefinedField(RPT_INVOICE_NO_FLD,drowInfo[PO_InvoiceMasterTable.INVOICENO_FLD].ToString().Trim());
			reportBuilder.DrawPredefinedField(RPT_RETURN_NO2_FLD,voReturnMaster.RTVNo);
	
				
			reportBuilder.RefreshReport();				
			
			//Print report
			try
			{
				printPreview.FormTitle = reportBuilder.GetFieldByName(RPT_TITLE_FLD).Text;
			}
			catch
			{}
				
			printPreview.Show();
		}
		private void CalculateAmount()
		{
			if (dgrdData[dgrdData.Row, PO_ReturnToVendorDetailTable.QUANTITY_FLD] != DBNull.Value 
				&& dgrdData[dgrdData.Row, PO_PurchaseOrderDetailTable.UNITPRICE_FLD] != DBNull.Value)
			{
				dgrdData.Columns[PO_ReturnToVendorDetailTable.AMOUNT_FLD].Value = Decimal.Parse(dgrdData[dgrdData.Row, PO_ReturnToVendorDetailTable.QUANTITY_FLD].ToString())
					* decimal.Parse(dgrdData[dgrdData.Row, PO_PurchaseOrderDetailTable.UNITPRICE_FLD].ToString());
				if (dgrdData[dgrdData.Row, PO_ReturnToVendorDetailTable.VATPERCENT_FLD] != DBNull.Value)
				{
					dgrdData.Columns[PO_ReturnToVendorDetailTable.VATAMOUNT_FLD].Value = decimal.Parse(dgrdData[dgrdData.Row, PO_ReturnToVendorDetailTable.VATPERCENT_FLD].ToString()) 
						* decimal.Parse(dgrdData[dgrdData.Row, PO_ReturnToVendorDetailTable.AMOUNT_FLD].ToString()) /100;
				}
				else
					dgrdData.Columns[PO_ReturnToVendorDetailTable.VATAMOUNT_FLD].Value = DBNull.Value;
				if (dgrdData[dgrdData.Row, PO_ReturnToVendorDetailTable.VATAMOUNT_FLD].ToString() != string.Empty)
				{
					dgrdData.Columns[PO_ReturnToVendorDetailTable.TOTALAMOUNT_FLD].Value = decimal.Parse(dgrdData[dgrdData.Row, PO_ReturnToVendorDetailTable.AMOUNT_FLD].ToString())
						+ decimal.Parse(dgrdData[dgrdData.Row, PO_ReturnToVendorDetailTable.VATAMOUNT_FLD].ToString());
				}
				else
					dgrdData.Columns[PO_ReturnToVendorDetailTable.TOTALAMOUNT_FLD].Value = decimal.Parse(dgrdData[dgrdData.Row, PO_ReturnToVendorDetailTable.AMOUNT_FLD].ToString());
			}
			else
			{
				dgrdData[dgrdData.Row,PO_ReturnToVendorDetailTable.AMOUNT_FLD] = DBNull.Value;
				dgrdData[dgrdData.Row,PO_ReturnToVendorDetailTable.VATAMOUNT_FLD] = DBNull.Value;
				dgrdData[dgrdData.Row,PO_ReturnToVendorDetailTable.TOTALAMOUNT_FLD] = DBNull.Value;
			}

		}
		private bool IsExisted(int pintProductID, int pintCurrentRow)
		{
			for (int i=0 ; i<dgrdData.RowCount; i++)
			{
				if (i != pintCurrentRow)
				{
					if (dgrdData[i,SO_ReturnedGoodsDetailTable.PRODUCTID_FLD] != DBNull.Value 
						&& dgrdData[i,SO_ReturnedGoodsDetailTable.PRODUCTID_FLD].ToString().Trim() != String.Empty
						&& int.Parse(dgrdData[i,SO_ReturnedGoodsDetailTable.PRODUCTID_FLD].ToString().Trim()) == pintProductID)
					{
						return true;
					}
				}
			}
			return false;
		}
		private bool ValidateMandatoryControl() 
		{
			if (cboCCN.SelectedIndex < 0) 
			{
				PCSMessageBox.Show(ErrorCode.MANDATORY_INVALID, MessageBoxIcon.Warning);
				cboCCN.Focus();
				return false;
			}
			if (dtmPostDate.Value == DBNull.Value || dtmPostDate.Text.Trim() == String.Empty) 
			{
				PCSMessageBox.Show(ErrorCode.MANDATORY_INVALID, MessageBoxIcon.Warning);
				dtmPostDate.Focus();
				return false;
			}
			//check the PostDate in the current period
			if (!FormControlComponents.CheckDateInCurrentPeriod((DateTime)dtmPostDate.Value))
			{
				PCSMessageBox.Show(ErrorCode.MESSAGE_RGV_POSTDATE_PERIOD, MessageBoxIcon.Warning);
				dtmPostDate.Focus();
				return false;
			}

			//check the PostDate smaller than the current date
			if ((DateTime)dtmPostDate.Value > new UtilsBO().GetDBDate())
			{
				PCSMessageBox.Show(ErrorCode.MESSAGE_INV_TRANSACTION_CANNOT_IN_FUTURE, MessageBoxIcon.Warning);
				dtmPostDate.Focus();
				return false;
			}
		
			if (txtReturnNo.Text.Trim() == String.Empty) 
			{
				PCSMessageBox.Show(ErrorCode.MANDATORY_INVALID,MessageBoxIcon.Warning);
				txtReturnNo.Focus();
				return false;
			}
			if (txtMasLoc.Tag == null)
			{
				PCSMessageBox.Show(ErrorCode.MANDATORY_INVALID, MessageBoxIcon.Warning);
				txtMasLoc.Focus();
				return false;
			}
			if (txtRefNo.Tag == null)
			{
				PCSMessageBox.Show(ErrorCode.MANDATORY_INVALID, MessageBoxIcon.Warning);
				txtRefNo.Focus();
				return false;
			}
			//check the Post data must be greater than the Transdate in the PO Purchase Order
			if ((DateTime)dtmPostDate.Value < DateTime.Parse(dtmOrderDate.ToShortDateString()))
			{
				PCSMessageBox.Show(ErrorCode.MESSAGE_RGV_POSTDATE_MUST_HIGHER_THANPODATE, MessageBoxIcon.Warning);
				dtmPostDate.Focus();
				return false;
			}

			if (txtVendorCode.Tag == null)
			{
				PCSMessageBox.Show(ErrorCode.MESSAGE_RGV_SELECTVENDOR,MessageBoxIcon.Warning);
				txtVendorCode.Focus();
				return false;
			}

			if (txtVendorLoc.Tag == null)
			{
				PCSMessageBox.Show(ErrorCode.MESSAGE_RGV_PURLOC,MessageBoxIcon.Warning);
				txtVendorLoc.Focus();
				return false;
			}
			
			int intDetailRows = dgrdData.RowCount;
			
			if (intDetailRows <= 0)
			{
				PCSMessageBox.Show(ErrorCode.MESSAGE_RGV_NOPRODUCT,MessageBoxIcon.Warning);
				dgrdData.Focus();
				dgrdData.Row = 0;
				dgrdData.Col = dstData.Tables[0].Columns.IndexOf(ITM_ProductTable.TABLE_NAME + ITM_ProductTable.CODE_FLD);

				return false;
			}
			//Check postdate in configuration
			if (!FormControlComponents.CheckPostDateInConfiguration((DateTime)dtmPostDate.Value))
				return false;
			return true;
		}
		private bool CheckGrid()
		{
			if(dstData.Tables.Count <= 0) return false;
			int intRowNumber = dgrdData.RowCount;
			for (int i = 0; i < intRowNumber; i++)
			{
				if(dgrdData[i, PO_ReturnToVendorDetailTable.PRODUCTID_FLD] == null ||
					dgrdData[i, PO_ReturnToVendorDetailTable.PRODUCTID_FLD].ToString().Trim() == String.Empty)
				{
					PCSMessageBox.Show(ErrorCode.MESSAGE_RGA_PRODUCT,MessageBoxIcon.Warning);
					
					dgrdData.Row = i;
					dgrdData.Col = dstData.Tables[0].Columns.IndexOf(ITM_ProductTable.TABLE_NAME + ITM_ProductTable.CODE_FLD);
					dgrdData.Focus();
					return false;
				}
				if (dgrdData[i, MST_BINTable.TABLE_NAME + MST_BINTable.CODE_FLD].ToString() == string.Empty)
				{
					PCSMessageBox.Show(ErrorCode.MESSAGE_MUST_SELECT_BIN_FOR_LOCATION,MessageBoxIcon.Warning);
					dgrdData.Focus();
					dgrdData.Row = i;
					dgrdData.Col = dstData.Tables[0].Columns.IndexOf(MST_BINTable.TABLE_NAME + MST_BINTable.CODE_FLD);
					return false;
				}
				if(dgrdData[i, PO_ReturnToVendorDetailTable.QUANTITY_FLD] == null ||
					dgrdData[i, PO_ReturnToVendorDetailTable.QUANTITY_FLD] == DBNull.Value ||
					decimal.Parse(dgrdData[i, PO_ReturnToVendorDetailTable.QUANTITY_FLD].ToString()) <=0)
				{
					PCSMessageBox.Show(ErrorCode.MESSAGE_RGV_RETURNQTY,MessageBoxIcon.Warning);
					dgrdData.Focus();
					dgrdData.Row = i;
					dgrdData.Col = dstData.Tables[0].Columns.IndexOf(PO_ReturnToVendorDetailTable.QUANTITY_FLD);

					return false;
				}
				else
				{
					if (cboReturnBy.SelectedIndex == 0)	// return by purchase order
					{
						//First get the product Id for this row
						string strProductID = dgrdData[i, PO_ReturnToVendorDetailTable.PRODUCTID_FLD].ToString();
						
						//get the total commit quantity
						decimal decTotalRemain = 0;
						decimal decReturnQuantity = 0;
						
						DataRow[] drow = dtbReceived.Select(ITM_ProductTable.PRODUCTID_FLD + "=" + strProductID);
						if (drow.Length > 1)
						{
							for (int j = 0; j < drow.Length; j++)
								decTotalRemain += Decimal.Parse(drow[j][TOTAL_REMAIN_FLD].ToString());
							for (int j = i; j < dgrdData.RowCount; j++)
							{
								if (dgrdData[i, ITM_ProductTable.PRODUCTID_FLD].ToString() == dgrdData[j, ITM_ProductTable.PRODUCTID_FLD].ToString())
									decReturnQuantity += Decimal.Parse(dgrdData[j, PO_ReturnToVendorDetailTable.QUANTITY_FLD].ToString());
								if (decReturnQuantity > decTotalRemain)
								{
									PCSMessageBox.Show(ErrorCode.MESSAGE_RGV_RETURNQTY,MessageBoxIcon.Warning);
									dgrdData.Row = j;
									dgrdData.Col = dstData.Tables[0].Columns.IndexOf(PO_ReturnToVendorDetailTable.QUANTITY_FLD);
									dgrdData.Focus();
									return false;
								}
							}
						
						}
					}
					else
					{
						// return by invoice
					}
				}
				if(dgrdData[i, PO_PurchaseOrderDetailTable.UNITPRICE_FLD] == null ||
					dgrdData[i, PO_PurchaseOrderDetailTable.UNITPRICE_FLD] == DBNull.Value ||
					decimal.Parse(dgrdData[i, PO_PurchaseOrderDetailTable.UNITPRICE_FLD].ToString()) <=0)
				{
					PCSMessageBox.Show(ErrorCode.MANDATORY_INVALID, MessageBoxIcon.Warning);
					dgrdData.Focus();
					dgrdData.Row = i;
					dgrdData.Col = dstData.Tables[0].Columns.IndexOf(PO_PurchaseOrderDetailTable.UNITPRICE_FLD);

					return false;
				}
				
				if(dgrdData[i, PO_ReturnToVendorDetailTable.BUYINGUMID_FLD] == null ||
					dgrdData[i, PO_ReturnToVendorDetailTable.BUYINGUMID_FLD].ToString().Trim() == String.Empty)
				{
					PCSMessageBox.Show(ErrorCode.MESSAGE_RGV_BUYINGUNIT,MessageBoxIcon.Warning);
					dgrdData.Focus();
					dgrdData.Row = i;
					dgrdData.Col = dstData.Tables[0].Columns.IndexOf(MST_UnitOfMeasureTable.TABLE_NAME + MST_UnitOfMeasureTable.CODE_FLD);

					return false;
				}

				
				if(dgrdData[i, PO_ReturnToVendorDetailTable.LOCATIONID_FLD] == null ||
					dgrdData[i, PO_ReturnToVendorDetailTable.LOCATIONID_FLD].ToString().Trim() == String.Empty)
				{
					PCSMessageBox.Show(ErrorCode.MESSAGE_RGA_LOCATION,MessageBoxIcon.Warning);
					dgrdData.Focus();
					dgrdData.Row = i;
					dgrdData.Col = dstData.Tables[0].Columns.IndexOf(MST_LocationTable.TABLE_NAME + MST_LocationTable.CODE_FLD);

					return false;
				}
			}
			
			return true;
		}

		private bool SaveData()
		{
			// assign master value
			voReturnMaster = new PO_ReturnToVendorMasterVO();
			voReturnMaster.CCNID = Convert.ToInt32(cboCCN.SelectedValue);
			voReturnMaster.PostDate = (DateTime)dtmPostDate.Value;
			voReturnMaster.RTVNo = txtReturnNo.Text.Trim();
			voReturnMaster.MasterLocationID = Convert.ToInt32(txtMasLoc.Tag);
			int intRefMasterID = Convert.ToInt32(txtRefNo.Tag);
			if (cboReturnBy.SelectedIndex == 0)
			{
				voReturnMaster.ByPO = true;
				voReturnMaster.PurchaseOrderMasterID = intRefMasterID;
			}
			else
			{
				voReturnMaster.ByInvoice = true;
				voReturnMaster.InvoiceMasterID = intRefMasterID;
			}
			try
			{
				voReturnMaster.ProductionLineId = Convert.ToInt32(txtProductionLine.Tag);
			}
			catch{}
			voReturnMaster.PartyID = Convert.ToInt32(txtVendorCode.Tag);
			voReturnMaster.PurchaseLocID = Convert.ToInt32(txtVendorLoc.Tag);

			FormControlComponents.SynchronyGridData(dgrdData);
			voReturnMaster.ReturnToVendorMasterID = boReturn.AddNewReturnToVendor(voReturnMaster, dstData);
			return true;
		}
		#endregion

		private void POReturnToVendor_Load(object sender, EventArgs e)
		{
			const string METHOD_NAME = THIS + ".POReturnToVendor_Load()";
			try
			{
				//Set form security
				Security objSecurity = new Security();
				this.Name = THIS;
				if (objSecurity.SetRightForUserOnForm(this, SystemProperty.UserName) == 0)
				{
					// You don't have the right to view this item
					PCSMessageBox.Show(ErrorCode.MESSAGE_YOU_HAVE_NO_RIGHT_TO_VIEW, MessageBoxIcon.Warning);
					this.Close();
					return;
				}

				//Load CCN and set default CCN
				UtilsBO boUtils = new UtilsBO();
				DataSet dstCCN = boUtils.ListCCN();				
				FormControlComponents.PutDataIntoC1ComboBox(cboCCN, dstCCN.Tables[MST_CCNTable.TABLE_NAME], MST_CCNTable.CODE_FLD, MST_CCNTable.CCNID_FLD, MST_CCNTable.TABLE_NAME);
				
				//Set default CCN for CNN combobox
				if (SystemProperty.CCNID != 0)
					cboCCN.SelectedValue = SystemProperty.CCNID;
				else
					cboCCN.SelectedIndex = 0;

				// init combo
				cboReturnBy.Items.AddRange(new string[]{lblPurchaseOrder.Text, lblInvoice.Text});
				
				//get grid layout
				dtbGridLayOut = FormControlComponents.StoreGridLayout(dgrdData);
				// set custom format for post date control
				dtmPostDate.CustomFormat = Constants.DATETIME_FORMAT;
				SwitchFormMode();
			}
			catch (PCSException ex)
			{
				PCSMessageBox.Show(ex.mCode, MessageBoxIcon.Error);
				try
				{
					Logger.LogMessage(ex.CauseException, METHOD_NAME, Level.ERROR);
				}
				catch
				{
					PCSMessageBox.Show(ErrorCode.LOG_EXCEPTION, MessageBoxButtons.OK, MessageBoxIcon.Error);
				}
			}
			catch (Exception ex)
			{
				PCSMessageBox.Show(ErrorCode.OTHER_ERROR, MessageBoxButtons.OK, MessageBoxIcon.Error);
				try
				{
					Logger.LogMessage(ex, METHOD_NAME, Level.ERROR);
				}
				catch
				{
					PCSMessageBox.Show(ErrorCode.LOG_EXCEPTION, MessageBoxIcon.Error);
				}
			}
		}

		private void txtReturnNo_Validating(object sender, CancelEventArgs e)
		{
			const string METHOD_NAME = THIS + ".txtReturnNo_Validating()";
			try
			{
				if (txtReturnNo.Modified)
				{
					if (txtReturnNo.Text != string.Empty)
					{
						Hashtable htCondition = new Hashtable();					
						htCondition.Add(PO_ReturnToVendorMasterTable.CCNID_FLD, Convert.ToInt32(cboCCN.SelectedValue));						
						DataRowView drvResult = FormControlComponents.OpenSearchForm(PO_ReturnToVendorMasterTable.TABLE_NAME, PO_ReturnToVendorMasterTable.RTVNO_FLD, txtReturnNo.Text.Trim(), htCondition, false);
						if (drvResult != null)
						{
							LoadReturnData(Convert.ToInt32(drvResult[PO_ReturnToVendorMasterTable.RETURNTOVENDORMASTERID_FLD]));
							btnDelete.Enabled = true;
						}
						else
							e.Cancel = true;
					}
					else // reset form
					{
						ResetForm();						
					}
				}
				SwitchFormMode();
			}
			catch (PCSException ex)
			{
				// displays the error message.
				PCSMessageBox.Show(ex.mCode, MessageBoxButtons.OK, MessageBoxIcon.Error);
				// log message.
				try
				{
					Logger.LogMessage(ex.CauseException, METHOD_NAME, Level.ERROR);
				}
				catch
				{
					PCSMessageBox.Show(ErrorCode.LOG_EXCEPTION, MessageBoxButtons.OK, MessageBoxIcon.Error);
				}
			}
			catch (Exception ex)
			{
				// displays the error message.
				PCSMessageBox.Show(ErrorCode.OTHER_ERROR, MessageBoxButtons.OK, MessageBoxIcon.Error);
				// log message.
				try
				{
					Logger.LogMessage(ex, METHOD_NAME, Level.ERROR);
				}
				catch
				{
					PCSMessageBox.Show(ErrorCode.LOG_EXCEPTION, MessageBoxButtons.OK, MessageBoxIcon.Error);
				}
			}
		}

		private void txtReturnNo_KeyDown(object sender, KeyEventArgs e)
		{
			const string METHOD_NAME = THIS + ".txtReturnNo_KeyDown()";
			try
			{
				if (e.KeyCode == Keys.F4)
					btnReturnNo_Click(null, null);
			}
			catch (PCSException ex)
			{
				// displays the error message.
				PCSMessageBox.Show(ex.mCode, MessageBoxButtons.OK, MessageBoxIcon.Error);
				// log message.
				try
				{
					Logger.LogMessage(ex.CauseException, METHOD_NAME, Level.ERROR);
				}
				catch
				{
					PCSMessageBox.Show(ErrorCode.LOG_EXCEPTION, MessageBoxButtons.OK, MessageBoxIcon.Error);
				}
			}
			catch (Exception ex)
			{
				// displays the error message.
				PCSMessageBox.Show(ErrorCode.OTHER_ERROR, MessageBoxButtons.OK, MessageBoxIcon.Error);
				// log message.
				try
				{
					Logger.LogMessage(ex, METHOD_NAME, Level.ERROR);
				}
				catch
				{
					PCSMessageBox.Show(ErrorCode.LOG_EXCEPTION, MessageBoxButtons.OK, MessageBoxIcon.Error);
				}
			}
		}

		private void btnReturnNo_Click(object sender, EventArgs e)
		{
			const string METHOD_NAME = THIS + ".btnReturnNo_Click()";
			try
			{
				Hashtable htCondition = new Hashtable();				
				htCondition.Add(PO_ReturnToVendorMasterTable.CCNID_FLD, Convert.ToInt32(cboCCN.SelectedValue));
				DataRowView drvResult = FormControlComponents.OpenSearchForm(PO_ReturnToVendorMasterTable.TABLE_NAME, PO_ReturnToVendorMasterTable.RTVNO_FLD, txtReturnNo.Text.Trim(), htCondition, true);
				if (drvResult != null)
				{
					LoadReturnData(Convert.ToInt32(drvResult[PO_ReturnToVendorMasterTable.RETURNTOVENDORMASTERID_FLD]));
					btnDelete.Enabled = true;
				}
				else
					txtReturnNo.Focus();
				SwitchFormMode();
			}
			catch (PCSException ex)
			{
				// displays the error message.
				PCSMessageBox.Show(ex.mCode, MessageBoxButtons.OK, MessageBoxIcon.Error);
				// log message.
				try
				{
					Logger.LogMessage(ex.CauseException, METHOD_NAME, Level.ERROR);
				}
				catch
				{
					PCSMessageBox.Show(ErrorCode.LOG_EXCEPTION, MessageBoxButtons.OK, MessageBoxIcon.Error);
				}
			}
			catch (Exception ex)
			{
				// displays the error message.
				PCSMessageBox.Show(ErrorCode.OTHER_ERROR, MessageBoxButtons.OK, MessageBoxIcon.Error);
				// log message.
				try
				{
					Logger.LogMessage(ex, METHOD_NAME, Level.ERROR);
				}
				catch
				{
					PCSMessageBox.Show(ErrorCode.LOG_EXCEPTION, MessageBoxButtons.OK, MessageBoxIcon.Error);
				}
			}
		}

		private void txtMasLoc_Validating(object sender, CancelEventArgs e)
		{
			const string METHOD_NAME = THIS + ".txtMasLoc_Validating()";
			try
			{
				if (!txtMasLoc.Modified) return;
				if (txtMasLoc.Text.Trim() == string.Empty)
				{
					txtMasLoc.Tag = null;
					ChangeMasLoc();
					return;
				}
				Hashtable htCondition = new Hashtable();
				htCondition.Add(PO_ReturnToVendorMasterTable.CCNID_FLD, Convert.ToInt32(cboCCN.SelectedValue));
				DataRowView drvResult = FormControlComponents.OpenSearchForm(MST_MasterLocationTable.TABLE_NAME, MST_MasterLocationTable.CODE_FLD, txtMasLoc.Text.Trim(), htCondition, false);
				if (drvResult != null)
				{
					txtMasLoc.Text = drvResult[MST_MasterLocationTable.CODE_FLD].ToString();
					txtMasLoc.Tag = drvResult[MST_MasterLocationTable.MASTERLOCATIONID_FLD].ToString();
					ChangeMasLoc();
				}
				else
					e.Cancel = true;
			}
			catch (PCSException ex)
			{
				// displays the error message.
				PCSMessageBox.Show(ex.mCode, MessageBoxButtons.OK, MessageBoxIcon.Error);
				// log message.
				try
				{
					Logger.LogMessage(ex.CauseException, METHOD_NAME, Level.ERROR);
				}
				catch
				{
					PCSMessageBox.Show(ErrorCode.LOG_EXCEPTION, MessageBoxButtons.OK, MessageBoxIcon.Error);
				}
			}
			catch (Exception ex)
			{
				// displays the error message.
				PCSMessageBox.Show(ErrorCode.OTHER_ERROR, MessageBoxButtons.OK, MessageBoxIcon.Error);
				// log message.
				try
				{
					Logger.LogMessage(ex, METHOD_NAME, Level.ERROR);
				}
				catch
				{
					PCSMessageBox.Show(ErrorCode.LOG_EXCEPTION, MessageBoxButtons.OK, MessageBoxIcon.Error);
				}
			}
		}

		private void txtMasLoc_KeyDown(object sender, KeyEventArgs e)
		{
			const string METHOD_NAME = THIS + ".txtMasLoc_KeyDown()";
			try
			{
				if (e.KeyCode == Keys.F4)
					btnMasLoc_Click(null, null);
			}
			catch (PCSException ex)
			{
				// displays the error message.
				PCSMessageBox.Show(ex.mCode, MessageBoxButtons.OK, MessageBoxIcon.Error);
				// log message.
				try
				{
					Logger.LogMessage(ex.CauseException, METHOD_NAME, Level.ERROR);
				}
				catch
				{
					PCSMessageBox.Show(ErrorCode.LOG_EXCEPTION, MessageBoxButtons.OK, MessageBoxIcon.Error);
				}
			}
			catch (Exception ex)
			{
				// displays the error message.
				PCSMessageBox.Show(ErrorCode.OTHER_ERROR, MessageBoxButtons.OK, MessageBoxIcon.Error);
				// log message.
				try
				{
					Logger.LogMessage(ex, METHOD_NAME, Level.ERROR);
				}
				catch
				{
					PCSMessageBox.Show(ErrorCode.LOG_EXCEPTION, MessageBoxButtons.OK, MessageBoxIcon.Error);
				}
			}
		}

		private void btnMasLoc_Click(object sender, EventArgs e)
		{
			const string METHOD_NAME = THIS + ".btnMasLoc_Click()";
			try
			{
				Hashtable htCondition = new Hashtable();
				htCondition.Add(PO_ReturnToVendorMasterTable.CCNID_FLD, Convert.ToInt32(cboCCN.SelectedValue));
				DataRowView drvResult = FormControlComponents.OpenSearchForm(MST_MasterLocationTable.TABLE_NAME, MST_MasterLocationTable.CODE_FLD, txtMasLoc.Text.Trim(), htCondition, true);
				if (drvResult != null)
				{
					txtMasLoc.Text = drvResult[MST_MasterLocationTable.CODE_FLD].ToString();
					txtMasLoc.Tag = drvResult[MST_MasterLocationTable.MASTERLOCATIONID_FLD].ToString();
					ChangeMasLoc();
				}
				else
					txtMasLoc.Focus();
			}
			catch (PCSException ex)
			{
				// displays the error message.
				PCSMessageBox.Show(ex.mCode, MessageBoxButtons.OK, MessageBoxIcon.Error);
				// log message.
				try
				{
					Logger.LogMessage(ex.CauseException, METHOD_NAME, Level.ERROR);
				}
				catch
				{
					PCSMessageBox.Show(ErrorCode.LOG_EXCEPTION, MessageBoxButtons.OK, MessageBoxIcon.Error);
				}
			}
			catch (Exception ex)
			{
				// displays the error message.
				PCSMessageBox.Show(ErrorCode.OTHER_ERROR, MessageBoxButtons.OK, MessageBoxIcon.Error);
				// log message.
				try
				{
					Logger.LogMessage(ex, METHOD_NAME, Level.ERROR);
				}
				catch
				{
					PCSMessageBox.Show(ErrorCode.LOG_EXCEPTION, MessageBoxButtons.OK, MessageBoxIcon.Error);
				}
			}
		}

		private void cboReturnBy_SelectedIndexChanged(object sender, EventArgs e)
		{
			const string METHOD_NAME = THIS + ".cboReturnBy_SelectedIndexChanged()";
			try
			{
				if (enumAction == EnumAction.Add)
				{
					txtRefNo.Text = string.Empty;
					txtRefNo.Tag = null;
					txtVendorCode.Text = string.Empty;
					txtVendorCode.Tag = null;
					txtVendorName.Text = string.Empty;
					txtVendorLoc.Text = string.Empty;
					txtVendorLoc.Tag = null;

					// clear data set
					if (dstData != null && dstData.Tables.Count > 0)
						dstData.Tables[0].Clear();
					if (cboReturnBy.SelectedIndex == 0)
					{
						txtProductionLine.Enabled = true;
						btnProductionLine.Enabled = true;
					}
					else
					{
						txtProductionLine.Text = string.Empty;
						txtProductionLine.Tag = null;
						txtProductionLine.Enabled = false;
						btnProductionLine.Enabled = false;
					}
				}
			}
			catch (PCSException ex)
			{
				// displays the error message.
				PCSMessageBox.Show(ex.mCode, MessageBoxButtons.OK, MessageBoxIcon.Error);
				// log message.
				try
				{
					Logger.LogMessage(ex.CauseException, METHOD_NAME, Level.ERROR);
				}
				catch
				{
					PCSMessageBox.Show(ErrorCode.LOG_EXCEPTION, MessageBoxButtons.OK, MessageBoxIcon.Error);
				}
			}
			catch (Exception ex)
			{
				// displays the error message.
				PCSMessageBox.Show(ErrorCode.OTHER_ERROR, MessageBoxButtons.OK, MessageBoxIcon.Error);
				// log message.
				try
				{
					Logger.LogMessage(ex, METHOD_NAME, Level.ERROR);
				}
				catch
				{
					PCSMessageBox.Show(ErrorCode.LOG_EXCEPTION, MessageBoxButtons.OK, MessageBoxIcon.Error);
				}
			}
		}
		private void txtRefNo_Validating(object sender, CancelEventArgs e)
		{
			const string METHOD_NAME = THIS + ".txtRefNo_Validating()";
			try
			{
				if (txtRefNo.Modified)
				{
					if (txtRefNo.Text.Trim() == string.Empty)
					{
						txtRefNo.Tag = null;
						txtVendorCode.Text = string.Empty;
						txtVendorCode.Tag = null;
						txtVendorName.Text = string.Empty;
						txtVendorLoc.Text = string.Empty;
						txtVendorLoc.Tag = null;
						if (dstData != null && dstData.Tables.Count > 0)
							dstData.Tables[0].Clear();
						return;
					}
					string strTableName = string.Empty, strFilterField = string.Empty, strFilterValue = txtRefNo.Text.Trim();
					if (cboReturnBy.SelectedIndex == 0) // return by purchase order
					{
						strTableName = V_PORETURNTOVENDOR;
						strFilterField = PO_PurchaseOrderMasterTable.CODE_FLD;
					}
					else // return by invoice
					{
						strTableName = V_INVOICETORETURN;
						strFilterField = PO_InvoiceMasterTable.INVOICENO_FLD;
					}
					DataRowView drvResult = FormControlComponents.OpenSearchForm(strTableName, strFilterField, strFilterValue, null, false);
					if (drvResult != null)
					{
						if (cboReturnBy.SelectedIndex == 0)
							ReturnByPO(drvResult.Row);
						else
							ReturnByInvoice(drvResult.Row);
					}
					else
						e.Cancel = true;
				}
			}
			catch (PCSException ex)
			{
				// displays the error message.
				PCSMessageBox.Show(ex.mCode, MessageBoxButtons.OK, MessageBoxIcon.Error);
				// log message.
				try
				{
					Logger.LogMessage(ex.CauseException, METHOD_NAME, Level.ERROR);
				}
				catch
				{
					PCSMessageBox.Show(ErrorCode.LOG_EXCEPTION, MessageBoxButtons.OK, MessageBoxIcon.Error);
				}
			}
			catch (Exception ex)
			{
				// displays the error message.
				PCSMessageBox.Show(ErrorCode.OTHER_ERROR, MessageBoxButtons.OK, MessageBoxIcon.Error);
				// log message.
				try
				{
					Logger.LogMessage(ex, METHOD_NAME, Level.ERROR);
				}
				catch
				{
					PCSMessageBox.Show(ErrorCode.LOG_EXCEPTION, MessageBoxButtons.OK, MessageBoxIcon.Error);
				}
			}
		}

		private void txtRefNo_KeyDown(object sender, KeyEventArgs e)
		{
			const string METHOD_NAME = THIS + ".txtRefNo_KeyDown()";
			try
			{
				if (e.KeyCode == Keys.F4)
					btnRefNo_Click(null, null);
			}
			catch (PCSException ex)
			{
				// displays the error message.
				PCSMessageBox.Show(ex.mCode, MessageBoxButtons.OK, MessageBoxIcon.Error);
				// log message.
				try
				{
					Logger.LogMessage(ex.CauseException, METHOD_NAME, Level.ERROR);
				}
				catch
				{
					PCSMessageBox.Show(ErrorCode.LOG_EXCEPTION, MessageBoxButtons.OK, MessageBoxIcon.Error);
				}
			}
			catch (Exception ex)
			{
				// displays the error message.
				PCSMessageBox.Show(ErrorCode.OTHER_ERROR, MessageBoxButtons.OK, MessageBoxIcon.Error);
				// log message.
				try
				{
					Logger.LogMessage(ex, METHOD_NAME, Level.ERROR);
				}
				catch
				{
					PCSMessageBox.Show(ErrorCode.LOG_EXCEPTION, MessageBoxButtons.OK, MessageBoxIcon.Error);
				}
			}
		}

		private void btnRefNo_Click(object sender, EventArgs e)
		{
			const string METHOD_NAME = THIS + ".btnRefNo_Click()";
			try
			{
				string strTableName = string.Empty, strFilterField = string.Empty, strFilterValue = txtRefNo.Text.Trim();
				if (cboReturnBy.SelectedIndex == 0) // return by purchase order
				{
					strTableName = V_PORETURNTOVENDOR;
					strFilterField = PO_PurchaseOrderMasterTable.CODE_FLD;
				}
				else // return by invoice
				{
					strTableName = V_INVOICETORETURN;
					strFilterField = PO_InvoiceMasterTable.INVOICENO_FLD;
				}
				DataRowView drvResult = FormControlComponents.OpenSearchForm(strTableName, strFilterField, strFilterValue, null, true);
				if (drvResult != null)
				{
					if (cboReturnBy.SelectedIndex == 0)
						ReturnByPO(drvResult.Row);
					else
						ReturnByInvoice(drvResult.Row);
				}
				else
					txtRefNo.Focus();
			}
			catch (PCSException ex)
			{
				// displays the error message.
				PCSMessageBox.Show(ex.mCode, MessageBoxButtons.OK, MessageBoxIcon.Error);
				// log message.
				try
				{
					Logger.LogMessage(ex.CauseException, METHOD_NAME, Level.ERROR);
				}
				catch
				{
					PCSMessageBox.Show(ErrorCode.LOG_EXCEPTION, MessageBoxButtons.OK, MessageBoxIcon.Error);
				}
			}
			catch (Exception ex)
			{
				// displays the error message.
				PCSMessageBox.Show(ErrorCode.OTHER_ERROR, MessageBoxButtons.OK, MessageBoxIcon.Error);
				// log message.
				try
				{
					Logger.LogMessage(ex, METHOD_NAME, Level.ERROR);
				}
				catch
				{
					PCSMessageBox.Show(ErrorCode.LOG_EXCEPTION, MessageBoxButtons.OK, MessageBoxIcon.Error);
				}
			}
		}

		private void txtProductionLine_Validating(object sender, CancelEventArgs e)
		{
			const string METHOD_NAME = THIS + ".txtProductionLine_Validating()";
			try
			{
				if (!txtProductionLine.Modified) return;
				if (txtProductionLine.Text.Trim() == string.Empty)
				{
					txtProductionLine.Tag = null;
					return;
				}
				DataRowView drvResult = FormControlComponents.OpenSearchForm(PRO_ProductionLineTable.TABLE_NAME, PRO_ProductionLineTable.CODE_FLD, txtProductionLine.Text.Trim(), null, false);
				if (drvResult != null)
				{
					txtProductionLine.Text = drvResult[PRO_ProductionLineTable.CODE_FLD].ToString();
					txtProductionLine.Tag = drvResult[PRO_ProductionLineTable.PRODUCTIONLINEID_FLD];
				}
				else
					e.Cancel = true;
			}
			catch (PCSException ex)
			{
				// displays the error message.
				PCSMessageBox.Show(ex.mCode, MessageBoxButtons.OK, MessageBoxIcon.Error);
				// log message.
				try
				{
					Logger.LogMessage(ex.CauseException, METHOD_NAME, Level.ERROR);
				}
				catch
				{
					PCSMessageBox.Show(ErrorCode.LOG_EXCEPTION, MessageBoxButtons.OK, MessageBoxIcon.Error);
				}
			}
			catch (Exception ex)
			{
				// displays the error message.
				PCSMessageBox.Show(ErrorCode.OTHER_ERROR, MessageBoxButtons.OK, MessageBoxIcon.Error);
				// log message.
				try
				{
					Logger.LogMessage(ex, METHOD_NAME, Level.ERROR);
				}
				catch
				{
					PCSMessageBox.Show(ErrorCode.LOG_EXCEPTION, MessageBoxButtons.OK, MessageBoxIcon.Error);
				}
			}
		}

		private void txtProductionLine_KeyDown(object sender, KeyEventArgs e)
		{
			const string METHOD_NAME = THIS + ".txtProductionLine_KeyDown()";
			try
			{
				if (e.KeyCode == Keys.F4)
					btnProductionLine_Click(null, null);
			}
			catch (PCSException ex)
			{
				// displays the error message.
				PCSMessageBox.Show(ex.mCode, MessageBoxButtons.OK, MessageBoxIcon.Error);
				// log message.
				try
				{
					Logger.LogMessage(ex.CauseException, METHOD_NAME, Level.ERROR);
				}
				catch
				{
					PCSMessageBox.Show(ErrorCode.LOG_EXCEPTION, MessageBoxButtons.OK, MessageBoxIcon.Error);
				}
			}
			catch (Exception ex)
			{
				// displays the error message.
				PCSMessageBox.Show(ErrorCode.OTHER_ERROR, MessageBoxButtons.OK, MessageBoxIcon.Error);
				// log message.
				try
				{
					Logger.LogMessage(ex, METHOD_NAME, Level.ERROR);
				}
				catch
				{
					PCSMessageBox.Show(ErrorCode.LOG_EXCEPTION, MessageBoxButtons.OK, MessageBoxIcon.Error);
				}
			}
		}

		private void btnProductionLine_Click(object sender, EventArgs e)
		{
			const string METHOD_NAME = THIS + ".btnProductionLine_Click()";
			try
			{
				DataRowView drvResult = FormControlComponents.OpenSearchForm(PRO_ProductionLineTable.TABLE_NAME, PRO_ProductionLineTable.CODE_FLD, txtProductionLine.Text.Trim(), null, true);
				if (drvResult != null)
				{
					txtProductionLine.Text = drvResult[PRO_ProductionLineTable.CODE_FLD].ToString();
					txtProductionLine.Tag = drvResult[PRO_ProductionLineTable.PRODUCTIONLINEID_FLD];
				}
				else
					txtProductionLine.Focus();
			}
			catch (PCSException ex)
			{
				// displays the error message.
				PCSMessageBox.Show(ex.mCode, MessageBoxButtons.OK, MessageBoxIcon.Error);
				// log message.
				try
				{
					Logger.LogMessage(ex.CauseException, METHOD_NAME, Level.ERROR);
				}
				catch
				{
					PCSMessageBox.Show(ErrorCode.LOG_EXCEPTION, MessageBoxButtons.OK, MessageBoxIcon.Error);
				}
			}
			catch (Exception ex)
			{
				// displays the error message.
				PCSMessageBox.Show(ErrorCode.OTHER_ERROR, MessageBoxButtons.OK, MessageBoxIcon.Error);
				// log message.
				try
				{
					Logger.LogMessage(ex, METHOD_NAME, Level.ERROR);
				}
				catch
				{
					PCSMessageBox.Show(ErrorCode.LOG_EXCEPTION, MessageBoxButtons.OK, MessageBoxIcon.Error);
				}
			}
		}

		private void txtVendorCode_Validating(object sender, CancelEventArgs e)
		{
			const string METHOD_NAME = THIS + ".txtVendorCode_Validating()";
			try
			{
				if (!txtVendorCode.Modified) return;
				if (txtVendorCode.Text.Trim() == string.Empty)
				{
					txtVendorCode.Tag = null;
					txtVendorName.Text = string.Empty;
					txtVendorLoc.Text = string.Empty;
					txtVendorLoc.Tag = null;
					return;
				}
				DataRowView drvResult = FormControlComponents.OpenSearchForm(MST_PartyTable.TABLE_NAME, MST_PartyTable.CODE_FLD, txtVendorCode.Text.Trim(), null, false);
				if (drvResult != null)
				{
					txtVendorCode.Text = drvResult[MST_PartyTable.CODE_FLD].ToString();
					txtVendorCode.Tag = drvResult[MST_PartyTable.PARTYID_FLD];
					txtVendorName.Text = drvResult[MST_PartyTable.NAME_FLD].ToString();
					txtVendorLoc.Text = string.Empty;
					txtVendorLoc.Tag = null;
				}
				else
					e.Cancel = true;
			}
			catch (PCSException ex)
			{
				// displays the error message.
				PCSMessageBox.Show(ex.mCode, MessageBoxButtons.OK, MessageBoxIcon.Error);
				// log message.
				try
				{
					Logger.LogMessage(ex.CauseException, METHOD_NAME, Level.ERROR);
				}
				catch
				{
					PCSMessageBox.Show(ErrorCode.LOG_EXCEPTION, MessageBoxButtons.OK, MessageBoxIcon.Error);
				}
			}
			catch (Exception ex)
			{
				// displays the error message.
				PCSMessageBox.Show(ErrorCode.OTHER_ERROR, MessageBoxButtons.OK, MessageBoxIcon.Error);
				// log message.
				try
				{
					Logger.LogMessage(ex, METHOD_NAME, Level.ERROR);
				}
				catch
				{
					PCSMessageBox.Show(ErrorCode.LOG_EXCEPTION, MessageBoxButtons.OK, MessageBoxIcon.Error);
				}
			}
		}

		private void txtVendorCode_KeyDown(object sender, KeyEventArgs e)
		{
			const string METHOD_NAME = THIS + ".txtVendorCode_KeyDown()";
			try
			{
				if (e.KeyCode == Keys.F4)
					btnVendorCode_Click(null, null);
			}
			catch (PCSException ex)
			{
				// displays the error message.
				PCSMessageBox.Show(ex.mCode, MessageBoxButtons.OK, MessageBoxIcon.Error);
				// log message.
				try
				{
					Logger.LogMessage(ex.CauseException, METHOD_NAME, Level.ERROR);
				}
				catch
				{
					PCSMessageBox.Show(ErrorCode.LOG_EXCEPTION, MessageBoxButtons.OK, MessageBoxIcon.Error);
				}
			}
			catch (Exception ex)
			{
				// displays the error message.
				PCSMessageBox.Show(ErrorCode.OTHER_ERROR, MessageBoxButtons.OK, MessageBoxIcon.Error);
				// log message.
				try
				{
					Logger.LogMessage(ex, METHOD_NAME, Level.ERROR);
				}
				catch
				{
					PCSMessageBox.Show(ErrorCode.LOG_EXCEPTION, MessageBoxButtons.OK, MessageBoxIcon.Error);
				}
			}
		}

		private void btnVendorCode_Click(object sender, EventArgs e)
		{
			const string METHOD_NAME = THIS + ".btnVendorCode_Click()";
			try
			{
				DataRowView drvResult = FormControlComponents.OpenSearchForm(MST_PartyTable.TABLE_NAME, MST_PartyTable.CODE_FLD, txtVendorCode.Text.Trim(), null, true);
				if (drvResult != null)
				{
					txtVendorCode.Text = drvResult[MST_PartyTable.CODE_FLD].ToString();
					txtVendorCode.Tag = drvResult[MST_PartyTable.PARTYID_FLD];
					txtVendorName.Text = drvResult[MST_PartyTable.NAME_FLD].ToString();
					txtVendorLoc.Text = string.Empty;
					txtVendorLoc.Tag = null;
				}
				else
					txtVendorCode.Focus();
			}
			catch (PCSException ex)
			{
				// displays the error message.
				PCSMessageBox.Show(ex.mCode, MessageBoxButtons.OK, MessageBoxIcon.Error);
				// log message.
				try
				{
					Logger.LogMessage(ex.CauseException, METHOD_NAME, Level.ERROR);
				}
				catch
				{
					PCSMessageBox.Show(ErrorCode.LOG_EXCEPTION, MessageBoxButtons.OK, MessageBoxIcon.Error);
				}
			}
			catch (Exception ex)
			{
				// displays the error message.
				PCSMessageBox.Show(ErrorCode.OTHER_ERROR, MessageBoxButtons.OK, MessageBoxIcon.Error);
				// log message.
				try
				{
					Logger.LogMessage(ex, METHOD_NAME, Level.ERROR);
				}
				catch
				{
					PCSMessageBox.Show(ErrorCode.LOG_EXCEPTION, MessageBoxButtons.OK, MessageBoxIcon.Error);
				}
			}
		}

		private void txtVendorLoc_Validating(object sender, CancelEventArgs e)
		{
			const string METHOD_NAME = THIS + ".txtVendorLoc_Validating()";
			try
			{
				if (!txtVendorLoc.Modified) return;
				if (txtVendorLoc.Text.Trim() == string.Empty)
				{
					txtVendorLoc.Tag = null;
					return;
				}
				DataRowView drvResult = FormControlComponents.OpenSearchForm(MST_PartyLocationTable.TABLE_NAME, MST_PartyLocationTable.CODE_FLD, txtVendorLoc.Text.Trim(), null, false);
				if (drvResult != null)
				{
					txtVendorLoc.Text = drvResult[MST_PartyLocationTable.CODE_FLD].ToString();
					txtVendorLoc.Tag = drvResult[MST_PartyLocationTable.PARTYLOCATIONID_FLD];
				}
				else
					e.Cancel = true;
			}
			catch (PCSException ex)
			{
				// displays the error message.
				PCSMessageBox.Show(ex.mCode, MessageBoxButtons.OK, MessageBoxIcon.Error);
				// log message.
				try
				{
					Logger.LogMessage(ex.CauseException, METHOD_NAME, Level.ERROR);
				}
				catch
				{
					PCSMessageBox.Show(ErrorCode.LOG_EXCEPTION, MessageBoxButtons.OK, MessageBoxIcon.Error);
				}
			}
			catch (Exception ex)
			{
				// displays the error message.
				PCSMessageBox.Show(ErrorCode.OTHER_ERROR, MessageBoxButtons.OK, MessageBoxIcon.Error);
				// log message.
				try
				{
					Logger.LogMessage(ex, METHOD_NAME, Level.ERROR);
				}
				catch
				{
					PCSMessageBox.Show(ErrorCode.LOG_EXCEPTION, MessageBoxButtons.OK, MessageBoxIcon.Error);
				}
			}
		}

		private void txtVendorLoc_KeyDown(object sender, KeyEventArgs e)
		{
			const string METHOD_NAME = THIS + ".txtVendorLoc_KeyDown()";
			try
			{
				if (e.KeyCode == Keys.F4)
					btnVendorLoc_Click(null, null);
			}
			catch (PCSException ex)
			{
				// displays the error message.
				PCSMessageBox.Show(ex.mCode, MessageBoxButtons.OK, MessageBoxIcon.Error);
				// log message.
				try
				{
					Logger.LogMessage(ex.CauseException, METHOD_NAME, Level.ERROR);
				}
				catch
				{
					PCSMessageBox.Show(ErrorCode.LOG_EXCEPTION, MessageBoxButtons.OK, MessageBoxIcon.Error);
				}
			}
			catch (Exception ex)
			{
				// displays the error message.
				PCSMessageBox.Show(ErrorCode.OTHER_ERROR, MessageBoxButtons.OK, MessageBoxIcon.Error);
				// log message.
				try
				{
					Logger.LogMessage(ex, METHOD_NAME, Level.ERROR);
				}
				catch
				{
					PCSMessageBox.Show(ErrorCode.LOG_EXCEPTION, MessageBoxButtons.OK, MessageBoxIcon.Error);
				}
			}
		}

		private void btnVendorLoc_Click(object sender, EventArgs e)
		{
			const string METHOD_NAME = THIS + ".btnVendorLoc_Click()";
			try
			{
				DataRowView drvResult = FormControlComponents.OpenSearchForm(MST_PartyLocationTable.TABLE_NAME, MST_PartyLocationTable.CODE_FLD, txtVendorLoc.Text.Trim(), null, true);
				if (drvResult != null)
				{
					txtVendorLoc.Text = drvResult[MST_PartyLocationTable.CODE_FLD].ToString();
					txtVendorLoc.Tag = drvResult[MST_PartyLocationTable.PARTYLOCATIONID_FLD];
				}
				else
					txtVendorLoc.Focus();
			}
			catch (PCSException ex)
			{
				// displays the error message.
				PCSMessageBox.Show(ex.mCode, MessageBoxButtons.OK, MessageBoxIcon.Error);
				// log message.
				try
				{
					Logger.LogMessage(ex.CauseException, METHOD_NAME, Level.ERROR);
				}
				catch
				{
					PCSMessageBox.Show(ErrorCode.LOG_EXCEPTION, MessageBoxButtons.OK, MessageBoxIcon.Error);
				}
			}
			catch (Exception ex)
			{
				// displays the error message.
				PCSMessageBox.Show(ErrorCode.OTHER_ERROR, MessageBoxButtons.OK, MessageBoxIcon.Error);
				// log message.
				try
				{
					Logger.LogMessage(ex, METHOD_NAME, Level.ERROR);
				}
				catch
				{
					PCSMessageBox.Show(ErrorCode.LOG_EXCEPTION, MessageBoxButtons.OK, MessageBoxIcon.Error);
				}
			}
		}

		private void dgrdData_KeyDown(object sender, KeyEventArgs e)
		{
			const string METHOD_NAME = THIS + ".dgrdData_KeyDown()";
			try
			{
				switch (e.KeyCode)
				{
					case Keys.F4:
						if (btnSave.Enabled)
							dgrdData_ButtonClick(sender, null);
						break;
					case Keys.Delete:
						if ((e.KeyCode == Keys.Delete)&&(dgrdData.SelectedRows.Count > 0))
						{
							if (btnSave.Enabled)
							{
								dgrdData.AllowDelete = true;
								FormControlComponents.DeleteMultiRowsOnTrueDBGrid(dgrdData);
								int intCount  = 0;
								foreach (DataRow objRow in dstData.Tables[0].Rows)
								{
									if(objRow.RowState != DataRowState.Deleted) 
										intCount++;
								}
								for (int i =0; i <intCount; i++)
									dgrdData[i, PO_PurchaseOrderDetailTable.LINE_FLD] = i+1;
							}
						}
						break;
				}
			}
			catch (PCSException ex)
			{
				// displays the error message.
				PCSMessageBox.Show(ex.mCode, MessageBoxButtons.OK, MessageBoxIcon.Error);
				// log message.
				try
				{
					Logger.LogMessage(ex.CauseException, METHOD_NAME, Level.ERROR);
				}
				catch
				{
					PCSMessageBox.Show(ErrorCode.LOG_EXCEPTION, MessageBoxButtons.OK, MessageBoxIcon.Error);
				}
			}
			catch (Exception ex)
			{
				// displays the error message.
				PCSMessageBox.Show(ErrorCode.OTHER_ERROR, MessageBoxButtons.OK, MessageBoxIcon.Error);
				// log message.
				try
				{
					Logger.LogMessage(ex, METHOD_NAME, Level.ERROR);
				}
				catch
				{
					PCSMessageBox.Show(ErrorCode.LOG_EXCEPTION, MessageBoxButtons.OK, MessageBoxIcon.Error);
				}
			}
		}

		private void dgrdData_AfterColUpdate(object sender, ColEventArgs e)
		{
			const string METHOD_NAME = THIS + ".dgrdData_AfterColUpdate()";
			try
			{
				switch (e.Column.DataColumn.DataField)
				{
					case ITM_ProductTable.TABLE_NAME + ITM_ProductTable.CODE_FLD:
					case ITM_ProductTable.DESCRIPTION_FLD:
						if ((e.Column.DataColumn.Tag == null) ||( e.Column.DataColumn.Value.ToString() == string.Empty))
						{
							dgrdData[dgrdData.Row, ITM_ProductTable.PRODUCTID_FLD] = string.Empty;
							dgrdData[dgrdData.Row, ITM_ProductTable.TABLE_NAME + ITM_ProductTable.CODE_FLD] = string.Empty;
							dgrdData[dgrdData.Row, ITM_ProductTable.DESCRIPTION_FLD] = string.Empty;
							dgrdData[dgrdData.Row, ITM_ProductTable.REVISION_FLD] = string.Empty;
							dgrdData[dgrdData.Row, PO_ReturnToVendorDetailTable.STOCKUMID_FLD] = string.Empty;
						}
						else
						{
							DataRowView drvResult = (DataRowView)e.Column.DataColumn.Tag;
							dgrdData[dgrdData.Row, ITM_ProductTable.TABLE_NAME + ITM_ProductTable.CODE_FLD] = drvResult[ITM_ProductTable.CODE_FLD];
							dgrdData[dgrdData.Row, ITM_ProductTable.PRODUCTID_FLD] = drvResult[ITM_ProductTable.PRODUCTID_FLD];
							dgrdData[dgrdData.Row, ITM_ProductTable.DESCRIPTION_FLD] = drvResult[ITM_ProductTable.DESCRIPTION_FLD];
							dgrdData[dgrdData.Row, ITM_ProductTable.REVISION_FLD] = drvResult[ITM_ProductTable.REVISION_FLD];
							dgrdData[dgrdData.Row, PO_ReturnToVendorDetailTable.STOCKUMID_FLD] = drvResult[ITM_ProductTable.STOCKUMID_FLD];
						}
						dgrdData[dgrdData.Row, PO_ReturnToVendorDetailTable.BUYINGUMID_FLD] = string.Empty;
						dgrdData[dgrdData.Row, MST_UnitOfMeasureTable.TABLE_NAME + MST_UnitOfMeasureTable.CODE_FLD] = string.Empty;
						break;
					case MST_LocationTable.TABLE_NAME + MST_LocationTable.CODE_FLD:
						dgrdData[dgrdData.Row, MST_BINTable.TABLE_NAME + MST_BINTable.CODE_FLD] = String.Empty;
						dgrdData[dgrdData.Row, MST_BINTable.BINID_FLD] = String.Empty;
						if ((e.Column.DataColumn.Tag == null) ||( e.Column.DataColumn.Value.ToString() == string.Empty))
							dgrdData[dgrdData.Row, MST_LocationTable.LOCATIONID_FLD] = String.Empty;
						else
						{
							DataRowView drvResult = (DataRowView)e.Column.DataColumn.Tag;
							dgrdData[dgrdData.Row, MST_LocationTable.TABLE_NAME + MST_LocationTable.CODE_FLD] = drvResult[MST_LocationTable.CODE_FLD];
							dgrdData[dgrdData.Row, MST_LocationTable.LOCATIONID_FLD] = drvResult[MST_LocationTable.LOCATIONID_FLD];
						}
						break;
					case MST_BINTable.TABLE_NAME + MST_BINTable.CODE_FLD:
						if ((e.Column.DataColumn.Tag == null) ||( e.Column.DataColumn.Value.ToString() == string.Empty))
							dgrdData[dgrdData.Row, PO_ReturnToVendorDetailTable.BINID_FLD] = String.Empty;
						else
						{
							DataRowView drvResult = (DataRowView)e.Column.DataColumn.Tag;
							dgrdData[dgrdData.Row, MST_BINTable.TABLE_NAME + MST_BINTable.CODE_FLD] = drvResult[MST_BINTable.CODE_FLD];
							dgrdData[dgrdData.Row, PO_ReturnToVendorDetailTable.BINID_FLD] = drvResult[MST_BINTable.BINID_FLD];
						}
						break;
					case MST_UnitOfMeasureTable.TABLE_NAME + MST_UnitOfMeasureTable.CODE_FLD:
						decimal dcmUMRate = 0;
						int intBuyingUnitID;
						int intStockID;
						if ((e.Column.DataColumn.Tag == null) ||( e.Column.DataColumn.Value.ToString() == string.Empty))
						{
							dgrdData[dgrdData.Row, MST_UnitOfMeasureTable.TABLE_NAME + MST_UnitOfMeasureTable.CODE_FLD] = String.Empty;
							dgrdData[dgrdData.Row, PO_ReturnToVendorDetailTable.UMRATE_FLD] = String.Empty;
						}
						else
						{
							DataRowView drvResult = (DataRowView)e.Column.DataColumn.Tag;
								
							dgrdData[dgrdData.Row, PO_ReturnToVendorDetailTable.BUYINGUMID_FLD] = drvResult[MST_UnitOfMeasureTable.UNITOFMEASUREID_FLD];
							dgrdData[dgrdData.Row, MST_UnitOfMeasureTable.TABLE_NAME + MST_UnitOfMeasureTable.CODE_FLD] = drvResult[MST_UnitOfMeasureTable.CODE_FLD];
							intStockID = int.Parse(dgrdData[dgrdData.Row, PO_ReturnToVendorDetailTable.STOCKUMID_FLD].ToString());
							intBuyingUnitID = int.Parse(drvResult[MST_UnitOfMeasureTable.UNITOFMEASUREID_FLD].ToString());
							if ( intBuyingUnitID != intStockID)
							{
								dcmUMRate = FormControlComponents.GetUMRate(intBuyingUnitID,intStockID);
								dgrdData[dgrdData.Row, PO_ReturnToVendorDetailTable.UMRATE_FLD] = dcmUMRate;
							}
							else
								dgrdData[dgrdData.Row, PO_ReturnToVendorDetailTable.UMRATE_FLD] = decimal.One;
						}
						break;
					case PO_ReturnToVendorDetailTable.QUANTITY_FLD:
					case PO_ReturnToVendorDetailTable.UNITPRICE_FLD:
					case PO_ReturnToVendorDetailTable.VATPERCENT_FLD:
						CalculateAmount();
						break;
				}
			}
			catch (PCSException ex)
			{
				// displays the error message.
				PCSMessageBox.Show(ex.mCode, MessageBoxButtons.OK, MessageBoxIcon.Error);
				// log message.
				try
				{
					Logger.LogMessage(ex.CauseException, METHOD_NAME, Level.ERROR);
				}
				catch
				{
					PCSMessageBox.Show(ErrorCode.LOG_EXCEPTION, MessageBoxButtons.OK, MessageBoxIcon.Error);
				}
			}
			catch (Exception ex)
			{
				// displays the error message.
				PCSMessageBox.Show(ErrorCode.OTHER_ERROR, MessageBoxButtons.OK, MessageBoxIcon.Error);
				// log message.
				try
				{
					Logger.LogMessage(ex, METHOD_NAME, Level.ERROR);
				}
				catch
				{
					PCSMessageBox.Show(ErrorCode.LOG_EXCEPTION, MessageBoxButtons.OK, MessageBoxIcon.Error);
				}
			}
		}

		private void dgrdData_AfterDelete(object sender, EventArgs e)
		{
			const string METHOD_NAME = THIS + ".dgrdData_AfterDelete()";
			try
			{
				for (int i = 0; i < dgrdData.RowCount; i++)
					dgrdData[i, PO_PurchaseOrderDetailTable.LINE_FLD] = i + 1;
			}
			catch (PCSException ex)
			{
				// displays the error message.
				PCSMessageBox.Show(ex.mCode, MessageBoxButtons.OK, MessageBoxIcon.Error);
				// log message.
				try
				{
					Logger.LogMessage(ex.CauseException, METHOD_NAME, Level.ERROR);
				}
				catch
				{
					PCSMessageBox.Show(ErrorCode.LOG_EXCEPTION, MessageBoxButtons.OK, MessageBoxIcon.Error);
				}
			}
			catch (Exception ex)
			{
				// displays the error message.
				PCSMessageBox.Show(ErrorCode.OTHER_ERROR, MessageBoxButtons.OK, MessageBoxIcon.Error);
				// log message.
				try
				{
					Logger.LogMessage(ex, METHOD_NAME, Level.ERROR);
				}
				catch
				{
					PCSMessageBox.Show(ErrorCode.LOG_EXCEPTION, MessageBoxButtons.OK, MessageBoxIcon.Error);
				}
			}
		}

		private void dgrdData_BeforeColUpdate(object sender, BeforeColUpdateEventArgs e)
		{
			const string METHOD_NAME = THIS + ".dgrdData_BeforeColUpdate()";
			try
			{
				DataRowView drvResult = null;
				string strColumnName = e.Column.DataColumn.DataField;
				string strColumValue = e.Column.DataColumn.Text.Trim();
				Hashtable htbCondition;
				string strProductID;
				switch (strColumnName)
				{
					case ITM_ProductTable.TABLE_NAME + ITM_ProductTable.CODE_FLD:
						if (strColumValue != string.Empty)
						{
							drvResult = FormControlComponents.OpenSearchForm(ITM_ProductTable.TABLE_NAME, ITM_ProductTable.CODE_FLD, strColumValue, null, false);
							if (drvResult != null)
							{
								// check for existing product in grid
								if (IsExisted(Convert.ToInt32(drvResult[ITM_ProductTable.PRODUCTID_FLD]), dgrdData.Row))
								{
									PCSMessageBox.Show(ErrorCode.MESSAGE_RGA_DUPLICATEPRO, MessageBoxIcon.Warning);
									e.Cancel = true;
								}
								else
									e.Column.DataColumn.Tag = drvResult;
							}
							else
								e.Cancel = true;
						}
						break;
					case ITM_ProductTable.DESCRIPTION_FLD:
						if (strColumValue != string.Empty)
						{
							drvResult = FormControlComponents.OpenSearchForm(ITM_ProductTable.TABLE_NAME, ITM_ProductTable.DESCRIPTION_FLD, strColumValue, null, false);
							if (drvResult != null)
							{
								// check for existing product in grid
								if (IsExisted(Convert.ToInt32(drvResult[ITM_ProductTable.PRODUCTID_FLD]), dgrdData.Row))
								{
									PCSMessageBox.Show(ErrorCode.MESSAGE_RGA_DUPLICATEPRO, MessageBoxIcon.Warning);
									e.Cancel = true;
								}
								else
									e.Column.DataColumn.Tag = drvResult;
							}
							else
								e.Cancel = true;
						}
						break;
					case MST_LocationTable.TABLE_NAME + MST_LocationTable.CODE_FLD:
						if (txtMasLoc.Tag == null)
						{
							PCSMessageBox.Show(ErrorCode.MESSAGE_RGA_SELECTMASLOC,MessageBoxIcon.Warning);
							e.Cancel = true;
						}
						if (strColumValue != string.Empty)
						{
							htbCondition = new Hashtable();
							htbCondition.Add(MST_LocationTable.MASTERLOCATIONID_FLD, Convert.ToInt32(txtMasLoc.Tag));
							drvResult = FormControlComponents.OpenSearchForm(MST_LocationTable.TABLE_NAME, MST_LocationTable.CODE_FLD, strColumValue, htbCondition, false);
							if (drvResult != null)
								e.Column.DataColumn.Tag = drvResult;
							else
								e.Cancel = true;
						}
						break;
					case MST_BINTable.TABLE_NAME + MST_BINTable.CODE_FLD:
						string strLocationID = string.Empty;
						try
						{
							strLocationID = dgrdData[dgrdData.Row,PO_ReturnToVendorDetailTable.LOCATIONID_FLD].ToString().Trim();
						}
						catch{}
						if (strLocationID == string.Empty)
						{
							PCSMessageBox.Show(ErrorCode.MESSAGE_RGA_SELECTLOC, MessageBoxIcon.Warning);
							e.Cancel = true;
						}
						if (strColumValue != string.Empty)
						{
							htbCondition = new Hashtable();
							htbCondition.Add(MST_LocationTable.LOCATIONID_FLD, strLocationID);
							drvResult = FormControlComponents.OpenSearchForm(MST_BINTable.TABLE_NAME, MST_BINTable.CODE_FLD, strColumValue, htbCondition, false);
							if (drvResult != null)
								e.Column.DataColumn.Tag = drvResult;
							else
								e.Cancel = true;
						}
						break;
					case PO_ReturnToVendorDetailTable.QUANTITY_FLD:
						if (e.Column.DataColumn.Value != null &&
							e.Column.DataColumn.Value.ToString().Trim() != string.Empty)
						{
							decimal decQuantity = 0;
							try
							{
								decQuantity = Convert.ToDecimal(e.Column.DataColumn.Value);
								if (decQuantity < 0)
									throw new Exception();
							}
							catch
							{
								PCSMessageBox.Show(ErrorCode.MESSAGE_MATERIALRECEIPT_QUANTITY_HIGHER_0, MessageBoxIcon.Warning);
								e.Cancel = true;
							}
							e.Column.DataColumn.Tag = e.Column.DataColumn.Value;
							if (cboReturnBy.SelectedIndex == 0 && txtRefNo.Tag != null)
							{
								//First get the product Id for this row
								strProductID = dgrdData[dgrdData.Row,PO_ReturnToVendorDetailTable.PRODUCTID_FLD].ToString();
								
								//get the total commit quantity
								decimal dcmTotalCommit = 0;

								//find the Product ID in the commit Sale order 
								DataRow[] drow = dtbReceived.Select(ITM_ProductTable.PRODUCTID_FLD + "=" + strProductID);
								//get the total commit quantity

								if (drow.Length == 0)
									dcmTotalCommit = 0;
							
								try
								{
									//get the total quantity remain after reach return to vendor
									dcmTotalCommit = decimal.Parse( drow[0][TOTAL_REMAIN_FLD].ToString());
								}
								catch
								{}
								if (drow.Length > 0)
								{
									if (decQuantity > dcmTotalCommit)
									{
										PCSMessageBox.Show(ErrorCode.MESSAGE_RGV_RETURNQTY,MessageBoxIcon.Warning);
										e.Cancel = true;
									}
								}
							}
						}
						break;
					case PO_ReturnToVendorDetailTable.UNITPRICE_FLD:
					case PO_ReturnToVendorDetailTable.VATPERCENT_FLD:
						if (e.Column.DataColumn.Value != null && e.Column.DataColumn.Value.ToString().Trim() != string.Empty)
						{
							try
							{
								if (Convert.ToDecimal(e.Column.DataColumn.Value) < 0)
									throw new Exception();
							}
							catch
							{
								e.Cancel = true;
							}
						}
						break;
				}
			}
			catch (PCSException ex)
			{
				// displays the error message.
				PCSMessageBox.Show(ex.mCode, MessageBoxButtons.OK, MessageBoxIcon.Error);
				// log message.
				try
				{
					Logger.LogMessage(ex.CauseException, METHOD_NAME, Level.ERROR);
				}
				catch
				{
					PCSMessageBox.Show(ErrorCode.LOG_EXCEPTION, MessageBoxButtons.OK, MessageBoxIcon.Error);
				}
			}
			catch (Exception ex)
			{
				// displays the error message.
				PCSMessageBox.Show(ErrorCode.OTHER_ERROR, MessageBoxButtons.OK, MessageBoxIcon.Error);
				// log message.
				try
				{
					Logger.LogMessage(ex, METHOD_NAME, Level.ERROR);
				}
				catch
				{
					PCSMessageBox.Show(ErrorCode.LOG_EXCEPTION, MessageBoxButtons.OK, MessageBoxIcon.Error);
				}
			}
		}

		private void dgrdData_BeforeDelete(object sender, C1.Win.C1TrueDBGrid.CancelEventArgs e)
		{
			const string METHOD_NAME = THIS + ".dgrdData_BeforeDelete()";
			try
			{
				if (PCSMessageBox.Show(ErrorCode.MESSAGE_DELETE_RECORD, MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes)
					e.Cancel = false;
				else
					e.Cancel = true;
			}
			catch (PCSException ex)
			{
				// displays the error message.
				PCSMessageBox.Show(ex.mCode, MessageBoxButtons.OK, MessageBoxIcon.Error);
				// log message.
				try
				{
					Logger.LogMessage(ex.CauseException, METHOD_NAME, Level.ERROR);
				}
				catch
				{
					PCSMessageBox.Show(ErrorCode.LOG_EXCEPTION, MessageBoxButtons.OK, MessageBoxIcon.Error);
				}
			}
			catch (Exception ex)
			{
				// displays the error message.
				PCSMessageBox.Show(ErrorCode.OTHER_ERROR, MessageBoxButtons.OK, MessageBoxIcon.Error);
				// log message.
				try
				{
					Logger.LogMessage(ex, METHOD_NAME, Level.ERROR);
				}
				catch
				{
					PCSMessageBox.Show(ErrorCode.LOG_EXCEPTION, MessageBoxButtons.OK, MessageBoxIcon.Error);
				}
			}
		}

		private void dgrdData_ButtonClick(object sender, ColEventArgs e)
		{
			const string METHOD_NAME = THIS + ".dgrdData_ButtonClick()";
			try
			{
				if (!dgrdData.AllowAddNew && !dgrdData.AllowUpdate)
					return;
				string strColumnName = dgrdData.Columns[dgrdData.Col].DataField;
				DataRowView drvResult = null;
				Hashtable htbCondition = null;
				switch (strColumnName)
				{
					case MST_LocationTable.TABLE_NAME + MST_LocationTable.CODE_FLD:
						if (txtMasLoc.Tag == null)
						{
							PCSMessageBox.Show(ErrorCode.MESSAGE_RGA_SELECTMASLOC,MessageBoxIcon.Warning);
							return;
						}
						htbCondition = new Hashtable();
						htbCondition.Add(MST_LocationTable.MASTERLOCATIONID_FLD, Convert.ToInt32(txtMasLoc.Tag));
						if (dgrdData.AddNewMode == AddNewModeEnum.AddNewCurrent)
							drvResult = FormControlComponents.OpenSearchForm(MST_LocationTable.TABLE_NAME, MST_LocationTable.CODE_FLD, dgrdData[dgrdData.Row, MST_LocationTable.TABLE_NAME + MST_LocationTable.CODE_FLD].ToString(), htbCondition, true);
						else
							drvResult = FormControlComponents.OpenSearchForm(MST_LocationTable.TABLE_NAME, MST_LocationTable.CODE_FLD, dgrdData.Columns[MST_LocationTable.TABLE_NAME + MST_LocationTable.CODE_FLD].Text.Trim(), htbCondition, true);
						if (drvResult != null)
						{
							dgrdData[dgrdData.Row, MST_LocationTable.TABLE_NAME + MST_LocationTable.CODE_FLD] = drvResult[MST_LocationTable.CODE_FLD];
							dgrdData[dgrdData.Row, MST_LocationTable.LOCATIONID_FLD] = drvResult[MST_LocationTable.LOCATIONID_FLD];
							// clear bin
							dgrdData[dgrdData.Row, MST_BINTable.TABLE_NAME + MST_BINTable.CODE_FLD] = string.Empty;
							dgrdData[dgrdData.Row, MST_BINTable.BINID_FLD] = string.Empty;
						}
						else
						{
							dgrdData.Col = dgrdData.Columns.IndexOf(dgrdData.Columns[MST_LocationTable.TABLE_NAME + MST_LocationTable.CODE_FLD]);
							dgrdData.Focus();
						}
						break;
					case MST_BINTable.TABLE_NAME + MST_BINTable.CODE_FLD:
						string strLocationID = dgrdData[dgrdData.Row,PO_ReturnToVendorDetailTable.LOCATIONID_FLD].ToString().Trim();
						if (strLocationID == string.Empty)
						{
							PCSMessageBox.Show(ErrorCode.MESSAGE_RGA_SELECTLOC, MessageBoxIcon.Warning);
							return;
						}
						htbCondition = new Hashtable();
						htbCondition.Add(MST_LocationTable.LOCATIONID_FLD, strLocationID);
						if (dgrdData.AddNewMode == AddNewModeEnum.AddNewCurrent)
							drvResult = FormControlComponents.OpenSearchForm(MST_BINTable.TABLE_NAME, MST_BINTable.CODE_FLD, dgrdData[dgrdData.Row, MST_BINTable.TABLE_NAME + MST_BINTable.CODE_FLD].ToString(), htbCondition, true);
						else
							drvResult = FormControlComponents.OpenSearchForm(MST_BINTable.TABLE_NAME, MST_BINTable.CODE_FLD, dgrdData.Columns[MST_BINTable.TABLE_NAME + MST_BINTable.CODE_FLD].Text.Trim(), htbCondition, true);
						if (drvResult != null)
						{
							dgrdData[dgrdData.Row, MST_BINTable.TABLE_NAME + MST_BINTable.CODE_FLD] = drvResult[MST_BINTable.CODE_FLD];
							dgrdData[dgrdData.Row, MST_BINTable.BINID_FLD] = drvResult[MST_BINTable.BINID_FLD];
						}
						else
						{
							dgrdData.Col = dgrdData.Columns.IndexOf(dgrdData.Columns[MST_BINTable.TABLE_NAME + MST_BINTable.CODE_FLD]);
							dgrdData.Focus();
						}
						break;
				}
			}
			catch (PCSException ex)
			{
				// displays the error message.
				PCSMessageBox.Show(ex.mCode, MessageBoxButtons.OK, MessageBoxIcon.Error);
				// log message.
				try
				{
					Logger.LogMessage(ex.CauseException, METHOD_NAME, Level.ERROR);
				}
				catch
				{
					PCSMessageBox.Show(ErrorCode.LOG_EXCEPTION, MessageBoxButtons.OK, MessageBoxIcon.Error);
				}
			}
			catch (Exception ex)
			{
				// displays the error message.
				PCSMessageBox.Show(ErrorCode.OTHER_ERROR, MessageBoxButtons.OK, MessageBoxIcon.Error);
				// log message.
				try
				{
					Logger.LogMessage(ex, METHOD_NAME, Level.ERROR);
				}
				catch
				{
					PCSMessageBox.Show(ErrorCode.LOG_EXCEPTION, MessageBoxButtons.OK, MessageBoxIcon.Error);
				}
			}
		}

		private void btnAdd_Click(object sender, EventArgs e)
		{
			const string METHOD_NAME = THIS + ".btnAdd_Click()";
			try
			{
				enumAction = EnumAction.Add;
				ResetForm();
				voReturnMaster = new PO_ReturnToVendorMasterVO();
				dtmPostDate.Value = new UtilsBO().GetDBDate();
				txtReturnNo.Text = FormControlComponents.GetNoByMask(this);
				FormControlComponents.SetDefaultMasterLocation(txtMasLoc);
				SwitchFormMode();
				dtmPostDate.Focus();
			}
			catch (PCSException ex)
			{
				// displays the error message.
				PCSMessageBox.Show(ex.mCode, MessageBoxButtons.OK, MessageBoxIcon.Error);
				// log message.
				try
				{
					Logger.LogMessage(ex.CauseException, METHOD_NAME, Level.ERROR);
				}
				catch
				{
					PCSMessageBox.Show(ErrorCode.LOG_EXCEPTION, MessageBoxButtons.OK, MessageBoxIcon.Error);
				}
			}
			catch (Exception ex)
			{
				// displays the error message.
				PCSMessageBox.Show(ErrorCode.OTHER_ERROR, MessageBoxButtons.OK, MessageBoxIcon.Error);
				// log message.
				try
				{
					Logger.LogMessage(ex, METHOD_NAME, Level.ERROR);
				}
				catch
				{
					PCSMessageBox.Show(ErrorCode.LOG_EXCEPTION, MessageBoxButtons.OK, MessageBoxIcon.Error);
				}
			}
		}

		private void btnSave_Click(object sender, EventArgs e)
		{
			const string METHOD_NAME = THIS + ".btnSave_Click()";
			try
			{
				if (PCSMessageBox.Show(ErrorCode.MESSAGE_CONFIRM_BEFORE_SAVE_DATA, MessageBoxButtons.YesNo, MessageBoxIcon.Question, MessageBoxDefaultButton.Button2) == DialogResult.Yes)
				{
					if (!dgrdData.EditActive)
					{
						if(Security.IsDifferencePrefix(this, lblReturnNo, txtReturnNo))
							return;
					}
					if (!ValidateMandatoryControl())
						return;
					if (!CheckGrid())
						return;

					if (SaveData())
					{
						LoadReturnData(voReturnMaster.ReturnToVendorMasterID);

						enumAction = EnumAction.Default;

						Security.UpdateUserNameModifyTransaction(this, PO_ReturnToVendorMasterTable.RETURNTOVENDORMASTERID_FLD, voReturnMaster.ReturnToVendorMasterID);
						PCSMessageBox.Show(ErrorCode.MESSAGE_AFTER_SAVE_DATA, MessageBoxIcon.Information);
					
						SwitchFormMode();
					}
				}
			}
			catch (PCSException ex)
			{
				// displays the error message.
				PCSMessageBox.Show(ex.mCode, MessageBoxButtons.OK, MessageBoxIcon.Error);
				// log message.
				try
				{
					Logger.LogMessage(ex.CauseException, METHOD_NAME, Level.ERROR);
				}
				catch
				{
					PCSMessageBox.Show(ErrorCode.LOG_EXCEPTION, MessageBoxButtons.OK, MessageBoxIcon.Error);
				}
			}
			catch (Exception ex)
			{
				// displays the error message.
				PCSMessageBox.Show(ErrorCode.OTHER_ERROR, MessageBoxButtons.OK, MessageBoxIcon.Error);
				// log message.
				try
				{
					Logger.LogMessage(ex, METHOD_NAME, Level.ERROR);
				}
				catch
				{
					PCSMessageBox.Show(ErrorCode.LOG_EXCEPTION, MessageBoxButtons.OK, MessageBoxIcon.Error);
				}
			}
		}

		private void btnDelete_Click(object sender, EventArgs e)
		{
			const string METHOD_NAME = THIS + ".btnDelete_Click()";
			try
			{
				if(PCSMessageBox.Show(ErrorCode.YES_NO_MESSAGE,MessageBoxButtons.YesNo,MessageBoxIcon.Question) == DialogResult.Yes)
				{
					boReturn.DeleteReturnToVendor(voReturnMaster.ReturnToVendorMasterID);
					
					ResetForm();

					if (dstData != null && dstData.Tables.Count > 0)
					{
						dstData.Tables[0].Clear();
						dstData.AcceptChanges();
					}
					PCSMessageBox.Show(ErrorCode.MESSAGE_AFTER_SAVE_DATA, MessageBoxIcon.Information);
					enumAction = EnumAction.Default;
                    SwitchFormMode();
				}
			}
			catch (PCSException ex)
			{
				// displays the error message.
				PCSMessageBox.Show(ex.mCode, MessageBoxButtons.OK, MessageBoxIcon.Error);
				// log message.
				try
				{
					Logger.LogMessage(ex.CauseException, METHOD_NAME, Level.ERROR);
				}
				catch
				{
					PCSMessageBox.Show(ErrorCode.LOG_EXCEPTION, MessageBoxButtons.OK, MessageBoxIcon.Error);
				}
			}
			catch (Exception ex)
			{
				// displays the error message.
				PCSMessageBox.Show(ErrorCode.OTHER_ERROR, MessageBoxButtons.OK, MessageBoxIcon.Error);
				// log message.
				try
				{
					Logger.LogMessage(ex, METHOD_NAME, Level.ERROR);
				}
				catch
				{
					PCSMessageBox.Show(ErrorCode.LOG_EXCEPTION, MessageBoxButtons.OK, MessageBoxIcon.Error);
				}
			}
		}

		private void btnPrint_Click(object sender, EventArgs e)
		{
			const string METHOD_NAME = THIS + ".btnPrint_Click()";
			try
			{
				if(voReturnMaster == null || voReturnMaster.ReturnToVendorMasterID <= 0)
					return;
				ShowPOSlipReport();
			}
			catch (PCSException ex)
			{
				// displays the error message.
				PCSMessageBox.Show(ex.mCode, MessageBoxButtons.OK, MessageBoxIcon.Error);
				// log message.
				try
				{
					Logger.LogMessage(ex.CauseException, METHOD_NAME, Level.ERROR);
				}
				catch
				{
					PCSMessageBox.Show(ErrorCode.LOG_EXCEPTION, MessageBoxButtons.OK, MessageBoxIcon.Error);
				}
			}
			catch (Exception ex)
			{
				// displays the error message.
				PCSMessageBox.Show(ErrorCode.OTHER_ERROR, MessageBoxButtons.OK, MessageBoxIcon.Error);
				// log message.
				try
				{
					Logger.LogMessage(ex, METHOD_NAME, Level.ERROR);
				}
				catch
				{
					PCSMessageBox.Show(ErrorCode.LOG_EXCEPTION, MessageBoxButtons.OK, MessageBoxIcon.Error);
				}
			}
		}

		private void btnHelp_Click(object sender, EventArgs e)
		{
			
		}

		private void btnClose_Click(object sender, EventArgs e)
		{
			this.Close();
		}

		private void POReturnToVendor_Closing(object sender, CancelEventArgs e)
		{
			const string METHOD_NAME = THIS + ".POReturnToVendor_Closing()";
			try
			{
				if (enumAction == EnumAction.Add)
				{
					DialogResult dlgResult = PCSMessageBox.Show(ErrorCode.MESSAGE_QUESTION_STORE_INTO_DATABASE, MessageBoxButtons.YesNoCancel, MessageBoxIcon.Question);
					switch (dlgResult)
					{
						case DialogResult.Yes:
							//Save before exit
							try
							{
								if (!ValidateMandatoryControl())
								{
									e.Cancel = true;
									break;
								}
								if (!CheckGrid())
								{
									e.Cancel = true;
									break;
								}
								if (!SaveData())
									e.Cancel = true;
							}
							catch
							{
								e.Cancel = true;
							}
							break;
						case DialogResult.No:
							e.Cancel = false;
							break;
						case DialogResult.Cancel:
							e.Cancel = true;
							break;
					}
				}
			}
			catch (PCSException ex)
			{
				// displays the error message.
				PCSMessageBox.Show(ex.mCode, MessageBoxButtons.OK, MessageBoxIcon.Error);
				// log message.
				try
				{
					Logger.LogMessage(ex.CauseException, METHOD_NAME, Level.ERROR);
				}
				catch
				{
					PCSMessageBox.Show(ErrorCode.LOG_EXCEPTION, MessageBoxButtons.OK, MessageBoxIcon.Error);
				}
			}
			catch (Exception ex)
			{
				// displays the error message.
				PCSMessageBox.Show(ErrorCode.OTHER_ERROR, MessageBoxButtons.OK, MessageBoxIcon.Error);
				// log message.
				try
				{
					Logger.LogMessage(ex, METHOD_NAME, Level.ERROR);
				}
				catch
				{
					PCSMessageBox.Show(ErrorCode.LOG_EXCEPTION, MessageBoxButtons.OK, MessageBoxIcon.Error);
				}
			}
		}

		private void lblPurchaseOrder_Click(object sender, System.EventArgs e)
		{
		
		}
	}
}
